spec/fixtures/misc/struct_compare_tests.txt in marty-6.1.0 vs spec/fixtures/misc/struct_compare_tests.txt in marty-8.0.0
- old
+ new
@@ -55,16 +55,16 @@
"res": false
},
{ "example_number": "11",
"v1": [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],
"v2": [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["one"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],
- "res": "path=[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0] class mismatch Integer String"
+ "res": "path=[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0] class mismatch Integer (1) != String (one)"
},
{ "example_number": "12",
"v1": [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],
"v2": [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]],
- "res": "path=[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0] class mismatch Array Integer"
+ "res": "path=[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0] class mismatch Array != Integer (1)"
},
{ "example_number": "13",
"v1": [{"a": 1, "b": 2, "c": 3, "d": 4},
{"a": 1, "b": 2, "c": 3, "d": 4},
{"a": 1, "b": 2, "c": 3, "d": 4},
@@ -116,16 +116,16 @@
"res": false
},
{ "example_number": "21",
"v1": [[[1,2,3], {"foo": "bar", "baz": null, "plugh": 2.434, "hash": { "value": [1,2] }}], 7, "value"],
"v2": [[[1,2,3], {"foo": "bar", "baz": false, "plugh": 2.434, "hash": { "value": [1,2] }}], 7, "value"],
- "res": "path=[0][1][\"baz\"] class mismatch NilClass FalseClass"
+ "res": "path=[0][1][\"baz\"] class mismatch NilClass != FalseClass"
},
{ "example_number": "22",
"v1": [[[1,2,3], {"foo": "bar", "baz": true, "plugh": 2.434, "hash": { "value": [1,false] }}], 7, "value"],
"v2": [[[1,2,3], {"foo": "bar", "baz": true, "plugh": 2.434, "hash": { "value": [1,null] }}], 7, "value"],
- "res": "path=[0][1][\"hash\"][\"value\"][1] class mismatch FalseClass NilClass"
+ "res": "path=[0][1][\"hash\"][\"value\"][1] class mismatch FalseClass != NilClass"
},
{ "example_number": "23",
"v1": {"pi": 3.1415926, "e": 2.7182818, "phi": 1.618034},
"v2": {"pi": 3.1415926, "e": 2.7282818, "phi": 1.618034},
"res": "path=[\"e\"] 2.7182818 != 2.7282818"
@@ -156,15 +156,25 @@
"res": false
},
{ "example_number": "29",
"v1": {"three": 3},
"v2": {"three": 3.0},
- "res": "path=[\"three\"] class mismatch Integer Float",
+ "res": "path=[\"three\"] class mismatch Integer (3) != Float (3.0)",
"cmp_opts": {"float_int_nomatch": true}
},
{ "example_number": "30",
"v1": {"three": 3, "dummy": "hi", "dummy2": 1},
"v2": {"three": 3.0, "dummy": "bye", "dummy2": 2},
"res": false,
"cmp_opts": {"float_int_nomatch": false, "ignore": ["dummy", "dummy2"]}
+},
+{ "example_number": "31",
+ "v1": {"a": 1},
+ "v2": {"a": [1]},
+ "res": "path=[\"a\"] class mismatch Integer (1) != Array"
+},
+{ "example_number": "32",
+ "v1": {"a": 1},
+ "v2": {"a": {"b": 1}},
+ "res": "path=[\"a\"] class mismatch Integer (1) != Hash"
}
]