File: kmn_test.go

package info (click to toggle)
golang-github-yourbasic-graph 1.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 400 kB
  • sloc: makefile: 2
file content (23 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package build

import "testing"

func TestKmn(t *testing.T) {
	if mess, diff := diff(Kmn(0, 0).String(), "0 []"); diff {
		t.Errorf("Kmn %s", mess)
	}

	if mess, diff := diff(Kmn(1, 1).String(), "2 [{0 1}]"); diff {
		t.Errorf("Kmn %s", mess)
	}

	if mess, diff := diff(Kmn(1, 2).String(), "3 [{0 1} {0 2}]"); diff {
		t.Errorf("Kmn %s", mess)
	}

	for m := 0; m < 5; m++ {
		for n := 0; n < 10; n++ {
			Consistent("Kmn", t, Kmn(m, n))
		}
	}
}