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{})
| 450 | // |
| 451 | // assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") |
| 452 | func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { |
| 453 | if h, ok := t.(tHelper); ok { |
| 454 | h.Helper() |
| 455 | } |
| 456 | return JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...) |
| 457 | } |
| 458 | |
| 459 | // Lenf asserts that the specified object has specific length. |
| 460 | // Lenf also fails if the object has a type that len() not accept. |