From c68448f15187a79c2bed31b6a7b0e3d496069ed2 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 3 Jan 2018 01:39:39 +0100 Subject: unexport --- flood_test.go | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'flood_test.go') 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) } }) } -- cgit v1.2.3