Skip to content

Commit

Permalink
unittest parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
PtrMan committed Dec 10, 2015
1 parent dd3eca8 commit e7c6b07
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/test/java/TestParse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import org.junit.Test;
import ptrman.causalReasoningSystem.functional.language.parser.Parse;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;

public class TestParse {
@Test
public void test() {
// zero parameter
Parse.parse("(a)");

Parse.parse("(+ )");

// two parameters
Parse.parse("(call0 a b)");

// one parameter
Parse.parse("(call0 a)");



// call in call
Parse.parse("(call0 (a))");

// integer constants
Parse.parse("(+ 5 6)");
}
}

0 comments on commit e7c6b07

Please sign in to comment.