You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-only compares with Long value when the schema type is int/long and the compare node is integer type, otherwise means one of schema or compare node is with decimal, so convert it to BigDecimal to do the compare.
-change some edge test cases, due to the way of measuring is changed, some edge scenarios don't apply anymore.
@@ -137,14 +139,25 @@ public void negativeDoubleOverflowTest() throws IOException {
137
139
assertTrue(format("Maximum %s and value %s are interpreted as Infinity, thus no schema violation should be reported", maximum, value), messages.isEmpty());
138
140
139
141
// document parsed with BigDecimal
142
+
140
143
doc = bigDecimalMapper.readTree(value);
141
-
messages = v.validate(doc);
142
-
assertTrue(format("Maximum %s and value %s are interpreted as Infinity, thus no schema violation should be reported", maximum, value), messages.isEmpty());
assertTrue(format("Maximum %s and value %s are equal, thus no schema violation should be reported", maximum, value), messages2.isEmpty());
147
+
} else {
148
+
assertFalse(format("Maximum %s is smaller than value %s , should be validation error reported", maximum, value), messages2.isEmpty());
149
+
}
150
+
143
151
144
152
// schema and document parsed with BigDecimal
145
153
v = factory.getSchema(bigDecimalMapper.readTree(schema));
146
-
messages = v.validate(doc);
147
-
assertTrue(format("Maximum %s and value %s are interpreted as Infinity, thus no schema violation should be reported", maximum, value), messages.isEmpty());
0 commit comments