Skip to content

Commit

Permalink
Improve test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
popematt committed Oct 5, 2024
1 parent fb35dee commit 2a4848a
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/test/java/com/amazon/ion/impl/macro/MacroEvaluatorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -791,12 +791,18 @@ class MacroEvaluatorTest {

object IfExpanderTestParameters {
val SINGLE_VALUE = template { int(1) }
val MULTI_VALUE_STREAM = template {
val SINGLE_VALUE_STREAM = template {
macro(Values) {
expressionGroup {
int(2)
}
}
}
val TWO_VALUE_STREAM = template {
macro(Values) {
expressionGroup {
int(3)
int(4)
int(5)
}
}
}
Expand All @@ -805,19 +811,23 @@ class MacroEvaluatorTest {
fun parameters() = listOf(
arguments(IfNone, None, true),
arguments(IfNone, SINGLE_VALUE, false),
arguments(IfNone, MULTI_VALUE_STREAM, false),
arguments(IfNone, SINGLE_VALUE_STREAM, false),
arguments(IfNone, TWO_VALUE_STREAM, false),

arguments(IfSome, None, false),
arguments(IfSome, SINGLE_VALUE, true),
arguments(IfSome, MULTI_VALUE_STREAM, true),
arguments(IfSome, SINGLE_VALUE_STREAM, true),
arguments(IfSome, TWO_VALUE_STREAM, true),

arguments(IfSingle, None, false),
arguments(IfSingle, SINGLE_VALUE, true),
arguments(IfSingle, MULTI_VALUE_STREAM, false),
arguments(IfSingle, SINGLE_VALUE_STREAM, true),
arguments(IfSingle, TWO_VALUE_STREAM, false),

arguments(IfMulti, None, false),
arguments(IfMulti, SINGLE_VALUE, false),
arguments(IfMulti, MULTI_VALUE_STREAM, true),
arguments(IfMulti, SINGLE_VALUE_STREAM, false),
arguments(IfMulti, TWO_VALUE_STREAM, true),
)
}

Expand Down

0 comments on commit 2a4848a

Please sign in to comment.