Skip to content

Commit b5296e6

Browse files
VolkerVolker
authored andcommitted
test for conditional operator
1 parent 9b554b1 commit b5296e6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/de/inetsoftware/jwebassembly/runtime/ControlFlowOperators.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public static Collection<Object[]> data() {
5151
addParam( list, script, "doWhileLoopWithBreak" );
5252
addParam( list, script, "whileLoop" );
5353
addParam( list, script, "forLoop" );
54+
addParam( list, script, "conditionalOperator" );
5455
}
5556
return list;
5657
}
@@ -294,5 +295,11 @@ static int forLoop() {
294295
}
295296
return a;
296297
}
298+
299+
@Export
300+
static int conditionalOperator () {
301+
int condition = 4;
302+
return condition >= 4 ? 1 : 2;
303+
}
297304
}
298305
}

0 commit comments

Comments
 (0)