summaryrefslogtreecommitdiff
path: root/flood_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'flood_test.go')
-rw-r--r--flood_test.go46
1 files changed, 23 insertions, 23 deletions
diff --git a/flood_test.go b/flood_test.go
index 6e7e846..086292c 100644
--- a/flood_test.go
+++ b/flood_test.go
@@ -4,50 +4,50 @@ import "testing"
func TestFlood(t *testing.T) {
testCases := []struct {
- Input string
- Result bool
+ line string
+ flood bool
}{
{
- Input: `! ! ! ! ! ! ! !`,
- Result: true,
+ line: `! ! ! ! ! ! ! !`,
+ flood: true,
},
{
- Input: `test test test test abc abc`,
- Result: true,
+ line: `test test test test abc abc`,
+ flood: true,
},
{
- Input: `! test ! test ! test ! test !`,
- Result: true,
+ line: `! test ! test ! test ! test !`,
+ flood: true,
},
{
- Input: `a b c d e f g h i j`,
- Result: false,
+ line: `a b c d e f g h i j`,
+ flood: false,
},
{
- Input: `const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };`,
- Result: false,
+ line: `const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };`,
+ flood: false,
},
{
- Input: `a = b > 3 ? 2 : 4`,
- Result: false,
+ line: `a = b > 3 ? 2 : 4`,
+ flood: false,
},
{
- Input: `AAAAAAAAAAAAAAAAAAAA`,
- Result: true,
+ line: `AAAAAAAAAAAAAAAAAAAA`,
+ flood: true,
},
{
- Input: `AAAAAAAAAABBBBBBBBBB`,
- Result: true,
+ line: `AAAAAAAAAABBBBBBBBBB`,
+ flood: true,
},
{
- Input: `ivy 3 3 rho (iota 9) in 2 6 7 8 9`,
- Result: false,
+ line: `ivy 3 3 rho (iota 9) in 2 6 7 8 9`,
+ flood: false,
},
}
for _, tc := range testCases {
- t.Run(tc.Input, func(t *testing.T) {
- if isFlood(tc.Input) != tc.Result {
- t.Errorf("want %v", tc.Result)
+ t.Run(tc.line, func(t *testing.T) {
+ if isFlood(tc.line) != tc.flood {
+ t.Errorf("want %v", tc.flood)
}
})
}