Browse Source

Fix test (for real this time)

pull/655/head
xpetit 4 years ago
parent
commit
a18dc001f0
No known key found for this signature in database
GPG Key ID: 97C60669182C17A5
  1. 15
      go/tests/prog/reverserange_prog/main.go

15
go/tests/prog/reverserange_prog/main.go

@ -3,10 +3,7 @@ package main
import (
"fmt"
"os"
"sort"
"strconv"
"lib"
)
func main() {
@ -23,10 +20,14 @@ func main() {
fmt.Println(err)
return
}
suite := lib.IntRange(a, b)
sort.Sort(sort.Reverse(sort.IntSlice(suite)))
for _, i := range suite {
fmt.Print(i)
fmt.Print(b)
for a != b {
if b < a {
b++
} else {
b--
}
fmt.Print(" ", b)
}
fmt.Println()
}

Loading…
Cancel
Save