JSONEqf asserts that two JSON strings are equivalent. assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted")
(t TestingT, expected string, actual string, msg string, args ...interface{})
| 1137 | // |
| 1138 | // assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") |
| 1139 | func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) { |
| 1140 | if h, ok := t.(tHelper); ok { |
| 1141 | h.Helper() |
| 1142 | } |
| 1143 | if assert.JSONEqf(t, expected, actual, msg, args...) { |
| 1144 | return |
| 1145 | } |
| 1146 | t.FailNow() |
| 1147 | } |
| 1148 | |
| 1149 | // Len asserts that the specified object has specific length. |
| 1150 | // Len also fails if the object has a type that len() not accept. |