Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Dec 6, 2024
1 parent b7b4d91 commit 6ebd983
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/test/java/io/cryostat/expressions/MatchExpressionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,18 @@ public void testPostWithoutTargets() {
}

@ParameterizedTest
@CsvSource(value = {"true, 200, true", "false, 200, false", "this is garbage, 400, false"})
@CsvSource(
delimiter = '|',
value = {
"true | 200 | true",
"false | 200 | false",
"this is garbage | 400 | false",
"target.alias == 'selftest' | 200 | true",
"target.alias == '' | 200 | false",
"eventTypeIds(target).exists(x, x.contains('jdk')) | 200 | true",
"eventTypeIds(target).exists(t, t.contains('nonsense')) | 200 | false",
"eventTypeIds(target).exists(x, t.contains('wrong binding')) | 400 | false",
})
public void testExpressionTest(String expr, int status, boolean expectTargets) {
int id = defineSelfCustomTarget();

Expand Down

0 comments on commit 6ebd983

Please sign in to comment.