Browse Source

Switch to Go modules, update Go version

pull/733/head
xpetit 4 years ago
parent
commit
a7d54e6b2c
No known key found for this signature in database
GPG Key ID: 97C60669182C17A5
  1. 20
      go/tests/Dockerfile
  2. 2
      go/tests/base/base.go
  3. 24
      go/tests/entrypoint.sh
  4. 2
      go/tests/func/abort_test/main.go
  5. 2
      go/tests/func/activebits_test/main.go
  6. 2
      go/tests/func/advancedsortwordarr_test/main.go
  7. 2
      go/tests/func/alphacount_test/main.go
  8. 4
      go/tests/func/any_test/main.go
  9. 2
      go/tests/func/appendrange_test/main.go
  10. 2
      go/tests/func/atoi_test/main.go
  11. 4
      go/tests/func/atoibase_test/main.go
  12. 2
      go/tests/func/basicatoi2_test/main.go
  13. 2
      go/tests/func/basicatoi_test/main.go
  14. 2
      go/tests/func/basicjoin_test/main.go
  15. 2
      go/tests/func/btreeapplybylevel_test/main.go
  16. 2
      go/tests/func/btreeapplyinorder_test/main.go
  17. 2
      go/tests/func/btreeapplypostorder_test/main.go
  18. 2
      go/tests/func/btreeapplypreorder_test/main.go
  19. 4
      go/tests/func/btreedeletenode_test/main.go
  20. 4
      go/tests/func/btreeinsertdata_test/main.go
  21. 4
      go/tests/func/btreeisbinary_test/main.go
  22. 4
      go/tests/func/btreelevelcount_test/main.go
  23. 4
      go/tests/func/btreemax_test/main.go
  24. 4
      go/tests/func/btreemin_test/main.go
  25. 4
      go/tests/func/btreesearchitem_test/main.go
  26. 4
      go/tests/func/btreetransplant_test/main.go
  27. 2
      go/tests/func/capitalize_test/main.go
  28. 2
      go/tests/func/chunk_test/main.go
  29. 2
      go/tests/func/collatzcountdown_test/main.go
  30. 2
      go/tests/func/compact_test/main.go
  31. 2
      go/tests/func/compare_test/main.go
  32. 2
      go/tests/func/concat_test/main.go
  33. 2
      go/tests/func/concatparams_test/main.go
  34. 4
      go/tests/func/convertbase_test/main.go
  35. 2
      go/tests/func/correct/challenge.go
  36. 4
      go/tests/func/countif_test/main.go
  37. 2
      go/tests/func/divmod_test/main.go
  38. 2
      go/tests/func/doppelganger_test/main.go
  39. 2
      go/tests/func/eightqueens_test/main.go
  40. 2
      go/tests/func/enigma_test/main.go
  41. 2
      go/tests/func/fib_test/main.go
  42. 2
      go/tests/func/fibonacci_test/main.go
  43. 4
      go/tests/func/findnextprime_test/main.go
  44. 4
      go/tests/func/findprevprime_test/main.go
  45. 2
      go/tests/func/firstrune_test/main.go
  46. 2
      go/tests/func/foldint_test/main.go
  47. 2
      go/tests/func/foreach_test/main.go
  48. 2
      go/tests/func/game23_test/main.go
  49. 2
      go/tests/func/halfcontest_test/main.go
  50. 2
      go/tests/func/index_test/main.go
  51. 2
      go/tests/func/interestingnumber_test/main.go
  52. 2
      go/tests/func/isalpha_test/main.go
  53. 2
      go/tests/func/isanagram_test/main.go
  54. 4
      go/tests/func/islower_test/main.go
  55. 2
      go/tests/func/isnegative_test/main.go
  56. 4
      go/tests/func/isnumeric_test/main.go
  57. 4
      go/tests/func/isprime_test/main.go
  58. 2
      go/tests/func/isprintable_test/main.go
  59. 2
      go/tests/func/issorted_test/main.go
  60. 4
      go/tests/func/isupper_test/main.go
  61. 2
      go/tests/func/iterativefactorial_test/main.go
  62. 2
      go/tests/func/iterativepower_test/main.go
  63. 2
      go/tests/func/itoa_test/main.go
  64. 2
      go/tests/func/itoabase_test/main.go
  65. 2
      go/tests/func/join_test/main.go
  66. 2
      go/tests/func/lastrune_test/main.go
  67. 2
      go/tests/func/lcm_test/main.go
  68. 4
      go/tests/func/listat_test/main.go
  69. 4
      go/tests/func/listclear_test/main.go
  70. 4
      go/tests/func/listfind_test/main.go
  71. 4
      go/tests/func/listforeach_test/main.go
  72. 4
      go/tests/func/listforeachif_test/main.go
  73. 4
      go/tests/func/listlast_test/main.go
  74. 4
      go/tests/func/listmerge_test/main.go
  75. 4
      go/tests/func/listpushback_test/main.go
  76. 4
      go/tests/func/listpushfront_test/main.go
  77. 4
      go/tests/func/listremoveif_test/main.go
  78. 4
      go/tests/func/listreverse_test/main.go
  79. 4
      go/tests/func/listsize_test/main.go
  80. 4
      go/tests/func/listsort_test/main.go
  81. 2
      go/tests/func/makerange_test/main.go
  82. 4
      go/tests/func/map_test/main.go
  83. 2
      go/tests/func/max_test/main.go
  84. 2
      go/tests/func/nauuo_test/main.go
  85. 2
      go/tests/func/nrune_test/main.go
  86. 2
      go/tests/func/pointone_test/main.go
  87. 2
      go/tests/func/printcomb2_test/main.go
  88. 2
      go/tests/func/printcomb_test/main.go
  89. 2
      go/tests/func/printcombn_test/main.go
  90. 2
      go/tests/func/printmemory_test/main.go
  91. 2
      go/tests/func/printnbr_test/main.go
  92. 4
      go/tests/func/printnbrbase_test/main.go
  93. 2
      go/tests/func/printnbrinorder_test/main.go
  94. 2
      go/tests/func/printstr_test/main.go
  95. 2
      go/tests/func/printwordstables_test/main.go
  96. 2
      go/tests/func/priorprime_test/main.go
  97. 2
      go/tests/func/quada_test/main.go
  98. 2
      go/tests/func/quadb_test/main.go
  99. 2
      go/tests/func/quadc_test/main.go
  100. 2
      go/tests/func/quadd_test/main.go
  101. Some files were not shown because too many files changed in this diff diff.show_more

20
go/tests/Dockerfile

@ -1,12 +1,22 @@
FROM golang:1.14.6-alpine3.12 FROM docker.01-edu.org/golang:1.16.0-alpine3.13
ENV GIT_TERMINAL_PROMPT=0 ENV GIT_TERMINAL_PROMPT=0
RUN apk add --no-cache git RUN apk add --no-cache git
RUN go get golang.org/x/tools/cmd/goimports RUN go get golang.org/x/tools/cmd/goimports
RUN go get github.com/01-edu/z01
COPY . src RUN mkdir -p /jail/student
RUN go get rc RUN touch /jail/student/go.mod
RUN go install rc prog/...
WORKDIR /public/go/tests
COPY go.* ./
RUN go mod download
COPY base base
COPY func func
COPY lib lib
COPY prog prog
COPY rc rc
RUN go install ./rc ./prog/...
COPY entrypoint.sh /usr/local/bin COPY entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

2
go/tests/base/base.go

@ -4,7 +4,7 @@ import (
"math/rand" "math/rand"
"strings" "strings"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func uniqueChar(s string) bool { func uniqueChar(s string) bool {

24
go/tests/entrypoint.sh

@ -2,15 +2,20 @@
set -e set -e
cd student
if test "$EXAM_MODE"; then
go mod init main 2>/dev/null
GOSUMDB=off go get github.com/01-edu/z01@v0.1.0 2>/dev/null
fi
if test "$EXAM_RUN_ONLY" = true; then if test "$EXAM_RUN_ONLY" = true; then
go build -o exe ./student go build -o exe "./$EXERCISE"
./exe "$@" ./exe "$@"
exit exit
fi fi
cd student if ! test "$EXAM_MODE"; then
if ! test "$SKIP_FORMATTING"; then
s=$(goimports -d .) s=$(goimports -d .)
if test "$s"; then if test "$s"; then
echo 'Your Go files are not correctly formatted :' echo 'Your Go files are not correctly formatted :'
@ -37,18 +42,13 @@ if test "$ALLOWED_FUNCTIONS" && test "$FILE"; then
rc "$FILE" $ALLOWED_FUNCTIONS rc "$FILE" $ALLOWED_FUNCTIONS
fi fi
cd
# Compile and run test # Compile and run test
if command -v "${EXERCISE}_test" >/dev/null 2>&1; then if command -v "${EXERCISE}_test" >/dev/null 2>&1; then
# The exercise is a program # The exercise is a program
go build -o exe "./student/$EXERCISE" go build -o exe "./$EXERCISE"
"${EXERCISE}_test" "${EXERCISE}_test"
else else
# The exercise is a function # The exercise is a function
mkdir src cd "/public/go/tests/func/${EXERCISE}_test"
ln -s $(pwd)/student $(pwd)/src/student go run .
GOPATH=$GOPATH:$PWD
go build "func/${EXERCISE}_test"
"./${EXERCISE}_test"
fi fi

2
go/tests/func/abort_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
// Receives 5 ints and returns the number in the middle // Receives 5 ints and returns the number in the middle

2
go/tests/func/activebits_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
// Function that return the number of active bits in the number passed as the argument // Function that return the number of active bits in the number passed as the argument

2
go/tests/func/advancedsortwordarr_test/main.go

@ -7,7 +7,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func advancedSortWordArr(a []string, f func(a, b string) int) { func advancedSortWordArr(a []string, f func(a, b string) int) {

2
go/tests/func/alphacount_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func alphaCount(s string) (i int) { func alphaCount(s string) (i int) {

4
go/tests/func/any_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func any(f func(string) bool, a []string) bool { func any(f func(string) bool, a []string) bool {

2
go/tests/func/appendrange_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func appendRange(min, max int) []int { func appendRange(min, max int) []int {

2
go/tests/func/atoi_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func atoi(s string) int { func atoi(s string) int {

4
go/tests/func/atoibase_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"base" "github.com/01-edu/public/go/tests/base"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func main() { func main() {

2
go/tests/func/basicatoi2_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func basicAtoi2(s string) int { func basicAtoi2(s string) int {

2
go/tests/func/basicatoi_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func basicAtoi(s string) int { func basicAtoi(s string) int {

2
go/tests/func/basicjoin_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func basicJoin(elems []string) string { func basicJoin(elems []string) string {

2
go/tests/func/btreeapplybylevel_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
) )
func main() { func main() {

2
go/tests/func/btreeapplyinorder_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
) )
func main() { func main() {

2
go/tests/func/btreeapplypostorder_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
) )
func main() { func main() {

2
go/tests/func/btreeapplypreorder_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
) )
func main() { func main() {

4
go/tests/func/btreedeletenode_test/main.go

@ -3,9 +3,9 @@ package main
import ( import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func parentListDelete(root *student.TreeNode) string { func parentListDelete(root *student.TreeNode) string {

4
go/tests/func/btreeinsertdata_test/main.go

@ -3,9 +3,9 @@ package main
import ( import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func parentListInsert(root *student.TreeNode) string { func parentListInsert(root *student.TreeNode) string {

4
go/tests/func/btreeisbinary_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func BTreeMinStu(root *student.TreeNode) *student.TreeNode { func BTreeMinStu(root *student.TreeNode) *student.TreeNode {

4
go/tests/func/btreelevelcount_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func errorMessage_level(fn interface{}, root, a *correct.TreeNode, b *student.TreeNode) { func errorMessage_level(fn interface{}, root, a *correct.TreeNode, b *student.TreeNode) {

4
go/tests/func/btreemax_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func errorMessage_max(fn interface{}, root, a *correct.TreeNode, b *student.TreeNode) { func errorMessage_max(fn interface{}, root, a *correct.TreeNode, b *student.TreeNode) {

4
go/tests/func/btreemin_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func errorMessage_min(fn interface{}, root, a *correct.TreeNode, b *student.TreeNode) { func errorMessage_min(fn interface{}, root, a *correct.TreeNode, b *student.TreeNode) {

4
go/tests/func/btreesearchitem_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func errorMessage_search(fn interface{}, root, a *correct.TreeNode, b *student.TreeNode, func errorMessage_search(fn interface{}, root, a *correct.TreeNode, b *student.TreeNode,

4
go/tests/func/btreetransplant_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func parentListTransp(root *student.TreeNode) string { func parentListTransp(root *student.TreeNode) string {

2
go/tests/func/capitalize_test/main.go

@ -6,7 +6,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func capitalize(s string) string { func capitalize(s string) string {

2
go/tests/func/chunk_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func chunk(a []int, ch int) { func chunk(a []int, ch int) {

2
go/tests/func/collatzcountdown_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func collatzCountdown(start int) int { func collatzCountdown(start int) int {

2
go/tests/func/compact_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func compact(slice *[]string) int { func compact(slice *[]string) int {

2
go/tests/func/compare_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func main() { func main() {

2
go/tests/func/concat_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func main() { func main() {

2
go/tests/func/concatparams_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func concatParams(args []string) string { func concatParams(args []string) string {

4
go/tests/func/convertbase_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"base" "github.com/01-edu/public/go/tests/base"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func convertNbrBase(n int, base string) string { func convertNbrBase(n int, base string) string {

2
go/tests/func/correct/challenge.go

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func FormatTree(root *TreeNode) string { func FormatTree(root *TreeNode) string {

4
go/tests/func/countif_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func countIf(f func(string) bool, a []string) int { func countIf(f func(string) bool, a []string) int {

2
go/tests/func/divmod_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func main() { func main() {

2
go/tests/func/doppelganger_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type node struct { type node struct {

2
go/tests/func/eightqueens_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
const size = 8 const size = 8

2
go/tests/func/enigma_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
// Helper function used in the test for checking the function Enigma() // Helper function used in the test for checking the function Enigma()

2
go/tests/func/fib_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func fib(n int) int { func fib(n int) int {

2
go/tests/func/fibonacci_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func fibonacci(i int) int { func fibonacci(i int) int {

4
go/tests/func/findnextprime_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func findNextPrime(nb int) int { func findNextPrime(nb int) int {

4
go/tests/func/findprevprime_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func findPrevPrime(nb int) int { func findPrevPrime(nb int) int {

2
go/tests/func/firstrune_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func firstRune(s string) rune { func firstRune(s string) rune {

2
go/tests/func/foldint_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func foldInt(f func(int, int) int, a []int, n int) { func foldInt(f func(int, int) int, a []int, n int) {

2
go/tests/func/foreach_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func forEach(f func(int), a []int) { func forEach(f func(int), a []int) {

2
go/tests/func/game23_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func game23(a, b int) int { func game23(a, b int) int {

2
go/tests/func/halfcontest_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func halfContest(h1, m1, h2, m2 int) int { func halfContest(h1, m1, h2, m2 int) int {

2
go/tests/func/index_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func index(s string, substr string) int { func index(s string, substr string) int {

2
go/tests/func/interestingnumber_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func isInteresting(n int) bool { func isInteresting(n int) bool {

2
go/tests/func/isalpha_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func isAlpha(s string) bool { func isAlpha(s string) bool {

2
go/tests/func/isanagram_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func isAnagram(s, t string) bool { func isAnagram(s, t string) bool {

4
go/tests/func/islower_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func main() { func main() {

2
go/tests/func/isnegative_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func isNegative(n int) { func isNegative(n int) {

4
go/tests/func/isnumeric_test/main.go

@ -5,8 +5,8 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func main() { func main() {

4
go/tests/func/isprime_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func main() { func main() {

2
go/tests/func/isprintable_test/main.go

@ -6,7 +6,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func isPrintable(s string) bool { func isPrintable(s string) bool {

2
go/tests/func/issorted_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func isSorted(f func(int, int) int, a []int) bool { func isSorted(f func(int, int) int, a []int) bool {

4
go/tests/func/isupper_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func main() { func main() {

2
go/tests/func/iterativefactorial_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func iterativeFactorial(nb int) int { func iterativeFactorial(nb int) int {

2
go/tests/func/iterativepower_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func iterativePower(nb int, power int) int { func iterativePower(nb int, power int) int {

2
go/tests/func/itoa_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func main() { func main() {

2
go/tests/func/itoabase_test/main.go

@ -6,7 +6,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func itoaBase(value, base int) string { func itoaBase(value, base int) string {

2
go/tests/func/join_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func join(elems []string, sep string) string { func join(elems []string, sep string) string {

2
go/tests/func/lastrune_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func lastRune(s string) rune { func lastRune(s string) rune {

2
go/tests/func/lcm_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func gcd(first, second int) int { func gcd(first, second int) int {

4
go/tests/func/listat_test/main.go

@ -3,9 +3,9 @@ package main
import ( import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node5 = student.NodeL type Node5 = student.NodeL

4
go/tests/func/listclear_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node4 = student.NodeL type Node4 = student.NodeL

4
go/tests/func/listfind_test/main.go

@ -3,9 +3,9 @@ package main
import ( import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node9 = student.NodeL type Node9 = student.NodeL

4
go/tests/func/listforeach_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node7 = student.NodeL type Node7 = student.NodeL

4
go/tests/func/listforeachif_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node8 = student.NodeL type Node8 = student.NodeL

4
go/tests/func/listlast_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node3 = student.NodeL type Node3 = student.NodeL

4
go/tests/func/listmerge_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node11 = student.NodeL type Node11 = student.NodeL

4
go/tests/func/listpushback_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type ListS = correct.List type ListS = correct.List

4
go/tests/func/listpushfront_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type ListSa = correct.List type ListSa = correct.List

4
go/tests/func/listremoveif_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node10 = student.NodeL type Node10 = student.NodeL

4
go/tests/func/listreverse_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node6 = student.NodeL type Node6 = student.NodeL

4
go/tests/func/listsize_test/main.go

@ -3,9 +3,9 @@ package main
import ( import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type Node2 = student.NodeL type Node2 = student.NodeL

4
go/tests/func/listsort_test/main.go

@ -5,9 +5,9 @@ import (
student "student" student "student"
"func/correct" "github.com/01-edu/public/go/tests/func/correct"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
type NodeI12 = student.NodeI type NodeI12 = student.NodeI

2
go/tests/func/makerange_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func makeRange(min, max int) []int { func makeRange(min, max int) []int {

4
go/tests/func/map_test/main.go

@ -3,8 +3,8 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
"lib/is" "github.com/01-edu/public/go/tests/lib/is"
) )
func isPositive(i int) bool { func isPositive(i int) bool {

2
go/tests/func/max_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func max(a []int) int { func max(a []int) int {

2
go/tests/func/nauuo_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func nauuo(plus, minus, rand int) string { func nauuo(plus, minus, rand int) string {

2
go/tests/func/nrune_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func nRune(s string, n int) rune { func nRune(s string, n int) rune {

2
go/tests/func/pointone_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func PointOne(n *int) { func PointOne(n *int) {

2
go/tests/func/printcomb2_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func printComb2() { func printComb2() {

2
go/tests/func/printcomb_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func printComb() { func printComb() {

2
go/tests/func/printcombn_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func show(n int, table [9]int, tmax [9]int) { func show(n int, table [9]int, tmax [9]int) {

2
go/tests/func/printmemory_test/main.go

@ -6,7 +6,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func printBase(nbr int) int { func printBase(nbr int) int {

2
go/tests/func/printnbr_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func printNbr(n int) { func printNbr(n int) {

4
go/tests/func/printnbrbase_test/main.go

@ -5,8 +5,8 @@ import (
student "student" student "student"
"base" "github.com/01-edu/public/go/tests/base"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func printNbrBase(n int, b string) { func printNbrBase(n int, b string) {

2
go/tests/func/printnbrinorder_test/main.go

@ -6,7 +6,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func intToDigits(n int) (digits []int) { func intToDigits(n int) (digits []int) {

2
go/tests/func/printstr_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func printStr(s string) { func printStr(s string) {

2
go/tests/func/printwordstables_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func printWordsTables(a []string) { func printWordsTables(a []string) {

2
go/tests/func/priorprime_test/main.go

@ -3,7 +3,7 @@ package main
import ( import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func priorPrime(x int) int { func priorPrime(x int) int {

2
go/tests/func/quada_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func drawLine(x int, s string) { func drawLine(x int, s string) {

2
go/tests/func/quadb_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func drawLineQuadB(x int, s string) { func drawLineQuadB(x int, s string) {

2
go/tests/func/quadc_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func drawLineQuadC(x int, s string) { func drawLineQuadC(x int, s string) {

2
go/tests/func/quadd_test/main.go

@ -5,7 +5,7 @@ import (
student "student" student "student"
"lib" "github.com/01-edu/public/go/tests/lib"
) )
func drawLineQuadD(x int, s string) { func drawLineQuadD(x int, s string) {

Some files were not shown because too many files changed in this diff diff.show_more

Loading…
Cancel
Save