1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- package inns
- import (
- "testing"
- )
- var (
- testStrInns = []string{
- "663802 397223",
- "8252 47222169",
- "8712530 92145",
- "0873 820 72512",
- "227 62 3382327",
- "886 62 2222010",
- "464 350 209157",
- "758956582077",
- "212551260755",
- "0432444 61455",
- "428880301819",
- "61309 59 33498",
- "667344101205",
- "6189115998",
- "426 1455105",
- "562 5340715",
- "6588135629",
- "253 7102466",
- "8195196 357",
- "23838 17246",
- "812 5976843",
- "4710 107563",
- "3732 71726",
- "2170 439945",
- "2193865 820",
- "8122 281402",
- }
- testStrInnsErr = []string{
- "66380a2397223",
- "825247222eu169",
- "8712530921457553",
- "087753382072512",
- "22762hetu3382327",
- "886ao622222010",
- "4643he50209157",
- "75895 te 6582077",
- "2asn12551260755",
- "043abc244461455",
- "428880err301819",
- "0x613095933498",
- "667344101205h",
- "618911xerr5998",
- "426x1455105",
- "562x5340715",
- "658813moreerr5629",
- "253x7102466",
- "8195196x357",
- "23check838 17246",
- "8check12x5976843",
- "4710x107563",
- "03732x71726",
- "2170x439945",
- "2193865x820",
- "81shit2 281402",
- }
- )
- func TestInnFromStr(t *testing.T) {
- for _, rawInn := range testStrInns {
- _, err := NewFromStr(rawInn)
- if err != nil {
- t.Fatalf("InnFromStr(%q), err == %q", rawInn, err)
- }
- }
- for _, rawInn := range testStrInnsErr {
- _, err := NewFromStr(rawInn)
- if err == nil {
- t.Fatalf("InnFromStr(%q), err == %v, must be though", rawInn, err)
- }
- }
- }
|