Skip to content

Commit

Permalink
Merge pull request #1296 from Cali0707/cesql-conformance-fixes
Browse files Browse the repository at this point in the history
fix: CESQL conformance tests are correct with spec v1
  • Loading branch information
duglin authored Jun 13, 2024
2 parents c28210f + 33836c1 commit d3bca3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 38 deletions.
9 changes: 2 additions & 7 deletions cesql/cesql_tck/binary_math_operators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ tests:
- name: Implicit casting, with both values string
expression: "'5' + '3'"
result: 8
- name: Implicit casting, with invalid boolean value
- name: Implicit casting, with boolean value
expression: "5 + TRUE"
result: 5
error: cast
- name: Implicit casting, with invalid string value
expression: "'5avc4' + 10"
result: 10
error: cast
result: 6
31 changes: 0 additions & 31 deletions cesql/cesql_tck/casting_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,34 +67,3 @@ tests:
- name: Cast identity "abc"
expression: STRING("abc")
result: "abc"

- name: "'true' is a boolean"
expression: IS_BOOL('true')
result: true
- name: "'FALSE' is a boolean"
expression: IS_BOOL('FALSE')
result: true
- name: 1 is not a boolean
expression: IS_BOOL(1)
result: false
- name: "'abc' is not a boolean"
expression: IS_BOOL('abc')
result: false

- name: "'-1' is an int"
expression: IS_INT('-1')
result: true
- name: "'1' is an int"
expression: IS_INT('1')
result: true
- name: true is not an int
expression: IS_INT(TRUE)
result: false
- name: "'abc' is not an int"
expression: IS_INT('abc')
result: false

- name: IS_STRING does not exists
expression: IS_STRING('ABC')
error: missingFunction
result: false
5 changes: 5 additions & 0 deletions cesql/cesql_tck/subscriptions_api_recreations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tests:
- name: Prefix filter on missing string extension
expression: "myext LIKE 'custom%'"
result: false
error: missingAttribute

- name: Suffix filter (1)
expression: "type like '%.error'"
Expand All @@ -37,6 +38,7 @@ tests:
- name: Suffix filter on missing string extension
expression: "myext LIKE '%ext'"
result: false
error: missingAttribute

- name: Exact filter (1)
expression: "id = 'myId'"
Expand All @@ -56,6 +58,7 @@ tests:
- name: Exact filter on missing string extension
expression: "myext = 'customext'"
result: false
error: missingAttribute

- name: Prefix filter AND Suffix filter (1)
expression: "id LIKE 'my%' AND source LIKE '%.ca'"
Expand All @@ -80,6 +83,7 @@ tests:
result: false
eventOverrides:
type: "example.event.type"
error: missingAttribute

- name: Prefix OR Suffix filter (1)
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
Expand Down Expand Up @@ -162,6 +166,7 @@ tests:
id: "myId"
type: "example.event.warning"
source: "http://localhost.localdomain"
error: missingAttribute



Expand Down

0 comments on commit d3bca3a

Please sign in to comment.