Skip to content

Commit

Permalink
#236: Added (failing) test for using CurrentIndex in a nested iterable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdb committed Jul 4, 2018
1 parent 0e12551 commit dac4afb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ public class CurrentIndexTest extends ParameterizedParse {
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] {
{ "[0, 1, 2, 3, 255] rep(CURRENT_INDEX), def(255)", seq(rep(VALUE_EQ_INDEX), def("value", con(1), eq(con(255)))), stream(0, 1, 2, 3, 255), enc(), true },
{ "[0, 1, 2, 3] repn(4, CURRENT_INDEX)", repn(VALUE_EQ_INDEX, con(4)), stream(0, 1, 2, 3), enc(), true },
{ "[255, 0, 1, 2, 3] def(255), while(<3, CURRENT_INDEX)", seq(def("value", con(1), eq(con(255))), whl(VALUE_EQ_INDEX, ltNum(con(3)))), stream(255, 0, 1, 2, 3), enc(), true },
{ "[0, 1, 2, 3] repn=3(CURRENT_INDEX)", repn(VALUE_EQ_INDEX, con(4)), stream(0, 1, 2, 3), enc(), true },
{ "[255, 0, 1, 2, 3] def(255), while<3(CURRENT_INDEX)", seq(def("value", con(1), eq(con(255))), whl(VALUE_EQ_INDEX, ltNum(con(3)))), stream(255, 0, 1, 2, 3), enc(), true },
{ "[0, 0, 1, 2, 1, 0, 1, 2] repn=2(CURRENT_INDEX, repn=3(CURRENT_INDEX))", repn(seq(VALUE_EQ_INDEX, repn(VALUE_EQ_INDEX, con(3))), con(2)), stream(0, 0, 1, 2, 1, 0, 1, 2), enc(), true },
//{ "[0, 1, 2, 3] seq(CURRENT_INDEX, ...)", seq(VALUE_EQ_INDEX, VALUE_EQ_INDEX, VALUE_EQ_INDEX, VALUE_EQ_INDEX), stream(0, 1, 2, 3), enc(), true }
});
}
Expand Down

0 comments on commit dac4afb

Please sign in to comment.