Skip to content

Commit

Permalink
Fix "(not) exists" exp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-dzianishchyts committed Feb 10, 2024
1 parent 27ed173 commit 9adab2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@ class ExpExistsTest {
@ParameterizedTest
@ValueSource(strings = {
"exists a",
"exists (a)",
"exists (1)",
"exists (a.b = b)"})
"exists a.b"})
public void parse(String expString) {
assertEquals(ExpExists.class, Exp.parse(expString).getClass());
}

@ParameterizedTest
@CsvSource(delimiter = '|', value = {
"exists a|exists a",
"exists (a)|exists a",
"exists (a.b = b)|exists (a.b = b)"
"exists a.b|exists a.b"
})
public void parsedToString(String expString, String expected) {
assertEquals(expected, Exp.parse(expString).toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@ class ExpNotExistsTest {
"not exists a",
"! exists a",
"!exists a",
"not exists (a)",
"not exists (1)",
"not exists (a.b = b)"})
"not exists a.b"})
public void parse(String expString) {
assertEquals(ExpNotExists.class, Exp.parse(expString).getClass());
}

@ParameterizedTest
@CsvSource(delimiter = '|', value = {
"not exists a|not exists a",
"not exists (a)|not exists a",
"not exists (a.b = b)|not exists (a.b = b)"
"not exists a.b|not exists a.b"
})
public void parsedToString(String expString, String expected) {
assertEquals(expected, Exp.parse(expString).toString());
Expand Down

0 comments on commit 9adab2b

Please sign in to comment.