Skip to content

Commit

Permalink
More compiler testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Feb 23, 2024
1 parent a8138a1 commit ac19d71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion convex-core/src/test/java/convex/core/lang/CompilerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,9 @@ public void testBindingFormRegression() {
// See #395, failure due to bad binding form
assertCompileError(step("(defn foo [ok 42])"));
assertCompileError(step("(defn foo [42 ok])"));

// OK since 42 now interpreted as a syntax tag on the parameter "ok"
assertNotError(step("(defn foo [^42 ok])"));
}

@Test
Expand All @@ -766,7 +769,7 @@ public void testEdgeCases() {
// TODO: sanity check? Does/should this depend on map ordering?
assertEquals(1L,evalL("(count {~(inc 1) 3 ~(dec 3) 4})"));

// TODO: figure out correct behaviour for this. Depends on read vs. readSyntax?
// TODO: figure out correct behaviour for this.
assertEquals(1L,evalL("(count #{*juice* *juice* *juice* *juice*})"));
assertEquals(1L,evalL("(count #{~*juice* ~*juice* ~*juice* ~*juice*})"));
//assertEquals(2L,evalL("(count {*juice* *juice* *juice* *juice*})"));
Expand Down

0 comments on commit ac19d71

Please sign in to comment.