(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestEncodeSingleMaskEdge(t *testing.T) { |
| 89 | for i, tc := range testCasesSingleEdge { |
| 90 | e := tc.mask |
| 91 | t.Run(strconv.FormatInt(int64(i), 10), func(t *testing.T) { |
| 92 | got := e.Encode(tc.in) |
| 93 | if got != tc.out { |
| 94 | t.Errorf("Encode(%q) want %q got %q", tc.in, tc.out, got) |
| 95 | } |
| 96 | got2 := e.Decode(got) |
| 97 | if got2 != tc.in { |
| 98 | t.Errorf("Decode(%q) want %q got %q", got, tc.in, got2) |
| 99 | } |
| 100 | }) |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | func TestEncodeDoubleMaskEdge(t *testing.T) { |
| 105 | for i, tc := range testCasesDoubleEdge { |