diff options
| author | dibyendumajumdar <mobile@majumdar.org.uk> | 2023-09-07 19:33:52 +0100 |
|---|---|---|
| committer | dibyendumajumdar <mobile@majumdar.org.uk> | 2023-09-07 19:33:52 +0100 |
| commit | 85e5d41217d27fd481a21d17f061d31dc120873b (patch) | |
| tree | 96e3fe2d316cf5a8fd78b6734054c23d3251cb54 /common/src/test | |
| parent | 867405ea40d3c8acd93e5e0e6030e8ad96eb2470 (diff) | |
| download | Simple-85e5d41217d27fd481a21d17f061d31dc120873b.tar.gz Simple-85e5d41217d27fd481a21d17f061d31dc120873b.zip | |
Removed all external code.
Removed the common chapter.
Reimplemented Lexer.
Revised the list of chapters to something more accurate.
Diffstat (limited to 'common/src/test')
| -rw-r--r-- | common/src/test/java/com/seaofnodes/simple/lexer/TestLexer.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/common/src/test/java/com/seaofnodes/simple/lexer/TestLexer.java b/common/src/test/java/com/seaofnodes/simple/lexer/TestLexer.java deleted file mode 100644 index aec5d171..00000000 --- a/common/src/test/java/com/seaofnodes/simple/lexer/TestLexer.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * DO NOT REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Contributor(s): - * - * This file is part of the Sea Of Nodes Simple Programming language - * implementation. See https://github.com/SeaOfNodes/Simple - * - * The contents of this file are subject to the terms of the - * Apache License Version 2 (the "APL"). You may not use this - * file except in compliance with the License. A copy of the - * APL may be obtained from: - * http://www.apache.org/licenses/LICENSE-2.0 - */ - -package com.seaofnodes.simple.lexer; - -import com.seaofnodes.simple.lexer.ecstasy.ErrorListener; -import com.seaofnodes.simple.lexer.ecstasy.Lexer; -import com.seaofnodes.simple.lexer.ecstasy.Source; -import com.seaofnodes.simple.lexer.ecstasy.Token; -import org.junit.Assert; -import org.junit.Test; - -public class TestLexer { - - @Test - public void testLexLineComment() - { - final String source = "//a comment\nx"; - Lexer lexer = new Lexer(new Source(source), new ErrorListener()); - Token token = lexer.next(); - Assert.assertEquals(token.getId(), Token.Id.EOL_COMMENT); - token = lexer.next(); - Assert.assertEquals("x", token.getValueText()); - } -} |
