package num import "testing" func TestSigned(t *testing.T) { testCases := []struct { i Signed s string }{ {0, ""}, {1, "+1"}, {-1, "-1"}, } for _, tc := range testCases { t.Run(tc.s, func(t *testing.T) { if tc.i.String() != tc.s { t.Errorf("got %v, want %v", tc.i, tc.s) } }) } }