(t *testing.T)
| 270 | } |
| 271 | |
| 272 | func TestAppendInt(t *testing.T) { |
| 273 | for _, tc := range internal.IntegerTestCases { |
| 274 | want := []byte(fmt.Sprintf("%d", tc.Val)) |
| 275 | got := enc.AppendInt([]byte{}, tc.Val) |
| 276 | if !bytes.Equal(got, want) { |
| 277 | t.Errorf("AppendInt(0x%x)\ngot: %s\nwant: %s", |
| 278 | tc.Val, |
| 279 | string(got), |
| 280 | string(want)) |
| 281 | } |
| 282 | } |
| 283 | } |
| 284 | func TestAppendUint(t *testing.T) { |
| 285 | for _, tc := range internal.UnsignedIntegerTestCases { |
| 286 | want := []byte(fmt.Sprintf("%d", tc.Val)) |