(t *testing.T)
| 381 | } |
| 382 | |
| 383 | func TestInput_Last(t *testing.T) { |
| 384 | lcn := New("4111 1111 1111 1348") |
| 385 | against := "1348" |
| 386 | if last := lcn.Last(4); last != against { |
| 387 | t.Errorf("Expected: to be %s but got: %s", against, last) |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | func TestInput_Prefix(t *testing.T) { |
| 392 | str := New("foobar") |