(t *testing.T)
| 926 | } |
| 927 | |
| 928 | func TestDontMatchCaseIncensitiveStructFields(t *testing.T) { |
| 929 | b := []byte(`{ "type": "changed" }`) |
| 930 | s := struct { |
| 931 | Type string |
| 932 | }{"unchanged"} |
| 933 | |
| 934 | if _, err := Parse(b, &s, DontMatchCaseInsensitiveStructFields); err != nil { |
| 935 | t.Error(err) |
| 936 | } |
| 937 | |
| 938 | if s.Type != "unchanged" { |
| 939 | t.Error("s.Type: expected to be unchanged but found", s.Type) |
| 940 | } |
| 941 | } |
| 942 | |
| 943 | func TestMarshalFuzzBugs(t *testing.T) { |
| 944 | tests := []struct { |