mirror of https://github.com/01-edu/public.git
Xavier Petit
5 years ago
committed by
xpetit
80 changed files with 236 additions and 364 deletions
@ -1,16 +1,15 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"strings" |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestBoolean(t *testing.T) { |
||||
func main() { |
||||
table := append(z01.MultRandWords(), "1 2 3 4 5") |
||||
|
||||
for _, s := range table { |
||||
z01.ChallengeMain(t, strings.Fields(s)...) |
||||
z01.ChallengeMain(strings.Fields(s)...) |
||||
} |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestFixthemain(t *testing.T) { |
||||
z01.ChallengeMain(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPilot(t *testing.T) { |
||||
z01.ChallengeMain(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPoint(t *testing.T) { |
||||
z01.ChallengeMain(t, "") |
||||
func main() { |
||||
z01.ChallengeMain("") |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintAlphabet(t *testing.T) { |
||||
z01.ChallengeMain(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintDigits(t *testing.T) { |
||||
z01.ChallengeMain(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,15 +1,14 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"strings" |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintParams(t *testing.T) { |
||||
func main() { |
||||
table := append(z01.MultRandWords(), "choumi is the best cat") |
||||
for _, s := range table { |
||||
z01.ChallengeMain(t, strings.Fields(s)...) |
||||
z01.ChallengeMain(strings.Fields(s)...) |
||||
} |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintReverseAlphabet(t *testing.T) { |
||||
z01.ChallengeMain(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestRectangle(t *testing.T) { |
||||
z01.ChallengeMain(t, "") |
||||
func main() { |
||||
z01.ChallengeMain("") |
||||
} |
||||
|
@ -1,12 +1,10 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestRevParams(t *testing.T) { |
||||
func main() { |
||||
args := []string{"choumi", "is", "the", "best", "cat"} |
||||
z01.ChallengeMain(t, args...) |
||||
z01.ChallengeMain(args...) |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestCountdown(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestDisplayAlphaM(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestDisplayAlRevM(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestHello(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestOnlya(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestOnlyz(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintAlphabetProg(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintCombProg(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintDigitsProg(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintRevCombProg(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,11 +1,9 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintReverseAlphabetProg(t *testing.T) { |
||||
z01.ChallengeMainExam(t) |
||||
func main() { |
||||
z01.ChallengeMain() |
||||
} |
||||
|
@ -1,15 +1,13 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestPrintStrProg(t *testing.T) { |
||||
func main() { |
||||
table := z01.MultRandASCII() |
||||
for _, arg := range table { |
||||
z01.ChallengeMainExam(t, arg) |
||||
z01.ChallengeMain(arg) |
||||
} |
||||
z01.ChallengeMainExam(t, "Hello World!") |
||||
z01.ChallengeMain("Hello World!") |
||||
} |
||||
|
@ -1,19 +1,17 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestRot13(t *testing.T) { |
||||
func main() { |
||||
table := append(z01.MultRandWords(), " ") |
||||
table = append(table, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRSTUVWXYZ") |
||||
table = append(table, "a b c d e f g h ijklmnopqrstuvwxyz A B C D E FGHIJKLMNOPRSTUVWXYZ") |
||||
|
||||
for _, s := range table { |
||||
z01.ChallengeMainExam(t, s) |
||||
z01.ChallengeMain(s) |
||||
} |
||||
z01.ChallengeMainExam(t, "1 argument", "2 arguments") |
||||
z01.ChallengeMainExam(t, "1 argument", "2 arguments", "3 arguments") |
||||
z01.ChallengeMain("1 argument", "2 arguments") |
||||
z01.ChallengeMain("1 argument", "2 arguments", "3 arguments") |
||||
} |
||||
|
@ -1,17 +1,15 @@
|
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestSwitchcase(t *testing.T) { |
||||
func main() { |
||||
table := append(z01.MultRandWords(), " ") |
||||
table = append(table, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") |
||||
table = append(table, "abcdefghi jklmnop qrstuvwxyz ABCDEFGHI JKLMNOPQR STUVWXYZ ! ") |
||||
|
||||
for _, s := range table { |
||||
z01.ChallengeMainExam(t, s) |
||||
z01.ChallengeMain(s) |
||||
} |
||||
} |
||||
|
@ -1,12 +1,10 @@
|
||||
package student_test |
||||
package main |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/01-edu/z01" |
||||
) |
||||
|
||||
func TestSortParams(t *testing.T) { |
||||
func main() { |
||||
args := []string{"1", "a", "2", "A", "3", "b", "4", "C"} |
||||
z01.ChallengeMain(t, args...) |
||||
z01.ChallengeMain(args...) |
||||
} |
||||
|
Loading…
Reference in new issue