You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
648 B

package main
import (
"../lib"
"./correct"
"./student"
)
// the structs from the other packages
// struct just for the first exercise
type NodeF = student.Node
type NodeFS = correct.Node
// simple struct, just insert a element in the struct
func main() {
n1 := &NodeFS{}
n2 := &NodeF{}
table := [][]int{{{132423}}}
for i := 0; i < 5; i++ {
table = append(table, lib.MultRandIntBetween(-1000000, 10000000))
}
for _, items := range table {
for _, item := range items {
correct.CreateElem(n1, item)
student.CreateElem(n2, item)
}
if n1.Data != n2.Data {
lib.Fatalf("CreateElem == %d instead of %d\n", n1, n2)
}
}
}