New test file for specific code section or data type

This commit is contained in:
2024-06-01 16:31:50 +02:00
parent f41ea96d17
commit f66cd1fdb1
19 changed files with 488 additions and 214 deletions
+17
View File
@@ -54,6 +54,14 @@ func TestIsString(t *testing.T) {
succeeded++
}
count++
if isIterator("fake") {
t.Errorf(`%d: isIterator("fake") -> result = true, want false`, count)
failed++
} else {
succeeded++
}
count++
b, ok := toBool(true)
if !(ok && b) {
@@ -72,6 +80,15 @@ func TestIsString(t *testing.T) {
succeeded++
}
count++
b, ok = toBool([]int{})
if ok {
t.Errorf("%d: toBool([]) b=%v, ok=%v -> result = true, want false", count, b, ok)
failed++
} else {
succeeded++
}
t.Logf("test count: %d, succeeded count: %d, failed count: %d", count, succeeded, failed)
}