Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CESQL conformance tests are correct with spec v1 #1296

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading