Skip to content

Commit

Permalink
Fix explicit conversion operator tests for malformed string inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
antvaset committed Jun 21, 2024
1 parent a022fc5 commit e362b34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,11 @@ public static Object[][] dataMethod() {
"cql/CqlStringOperatorsTest/toString tests/DateTimeToString3",
"cql/CqlTypeOperatorsTest/As/AsQuantity",
"cql/CqlTypeOperatorsTest/As/CastAsQuantity",
"cql/CqlTypeOperatorsTest/Convert/StringToDateTimeMalformed",
"cql/CqlTypeOperatorsTest/Convert/StringToIntegerError",
"cql/CqlTypeOperatorsTest/ToDateTime/ToDateTimeDate",
"cql/CqlTypeOperatorsTest/ToDateTime/ToDateTimeMalformed",
"cql/CqlTypeOperatorsTest/ToDateTime/ToDateTimeTimeUnspecified",
"cql/CqlTypeOperatorsTest/ToTime/ToTime2",
"cql/CqlTypeOperatorsTest/ToTime/ToTime3",
"cql/CqlTypeOperatorsTest/ToTime/ToTime4",
"cql/CqlTypeOperatorsTest/ToTime/ToTimeMalformed",
"cql/CqlTypesTest/DateTime/DateTimeUncertain",
"cql/CqlTypesTest/Time/TimeUpperBoundMillis",
"cql/ValueLiteralsAndSelectors/Boolean/BooleanFalse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<output>'5'</output>
</test>
<test name="StringToIntegerError">
<expression invalid="true">convert 'foo' to Integer</expression>
<!-- EXPECT: Unable to convert given string to Integer -->
<expression>convert 'foo' to Integer</expression>
<output>null</output>
</test>
<test name="StringToDateTime">
<expression>convert '2014-01-01' to DateTime</expression>
Expand All @@ -37,8 +37,8 @@
<output>@T14:30:00.000</output>
</test>
<test name="StringToDateTimeMalformed">
<expression invalid="true">convert '2014/01/01' to DateTime</expression>
<!-- EXPECT: Invalid format: "2014/01/01" is malformed at "/01/01" -->
<expression>convert '2014/01/01' to DateTime</expression>
<output>null</output>
</test>
</group>
<group name="Is">
Expand Down Expand Up @@ -93,8 +93,8 @@
<output>@2014-01-01T12:05:05.955+00:00</output>
</test>
<test name="ToDateTimeMalformed">
<expression invalid="true">ToDateTime('2014/01/01T12:05:05.955Z')</expression>
<!-- EXPECT: Invalid format: "2014/01/01T12:05:05.955" is malformed at "/01/01T12:05:05.955" -->
<expression>ToDateTime('2014/01/01T12:05:05.955Z')</expression>
<output>null</output>
</test>
<test name="ToDateTimeDate">
<expression>ToDateTime(@2014-01-01)</expression>
Expand Down Expand Up @@ -159,8 +159,8 @@
<output>@T14:30:00.000</output>
</test>
<test name="ToTimeMalformed">
<expression invalid="true">ToTime('T14-30-00.0')</expression>
<!-- EXPECT: Invalid format: "T14-30-00.0" is malformed at "-30-00.0" -->
<expression>ToTime('T14-30-00.0')</expression>
<output>null</output>
</test>
</group>
</tests>

0 comments on commit e362b34

Please sign in to comment.