diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2016-06-13 23:16:54 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2016-07-26 19:46:50 +0300 |
| commit | 12eeefcdba1ee392f033f51e6b9826eaae3c4de6 (patch) | |
| tree | 061f3472bfc924dfa05b46f3aeab76b788b86914 /test/MainTest.java | |
| parent | 560e490ea44970edca22181cc2726f0b2ebb82c9 (diff) | |
Add tokenizer, parser and support for certain operations
Diffstat (limited to 'test/MainTest.java')
| -rw-r--r-- | test/MainTest.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/MainTest.java b/test/MainTest.java new file mode 100644 index 0000000..fec91a7 --- /dev/null +++ b/test/MainTest.java @@ -0,0 +1,24 @@ +package com.jantuomi.interpreter.test; + +import com.jantuomi.interpreter.main.Main; +import org.junit.Test; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +/** + * Created by jan on 10.6.2016. + */ +public class MainTest { + @Test + public void testParseArguments1() { + String[] notAnArgument = {"--not-an-argument"}; + assertFalse(Main.parseArguments(notAnArgument)); + } + + @Test + public void testParseArguments2() { + String[] fileTestArgument = {"-f", "test.file"}; + assertTrue(Main.parseArguments(fileTestArgument)); + } +}
\ No newline at end of file |
