Skip to content

Commit ce89f11

Browse files
author
JackWhite20
committed
Update parser test
1 parent 1972e36 commit ce89f11

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/test/java/net/jackwhite20/slug/parser/TestParser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import net.jackwhite20.slug.ast.FunctionNode;
2020
import net.jackwhite20.slug.ast.MainNode;
21+
import net.jackwhite20.slug.ast.NoOpNode;
2122
import net.jackwhite20.slug.ast.Node;
2223
import net.jackwhite20.slug.lexer.Lexer;
2324
import org.junit.Before;
@@ -60,7 +61,8 @@ public void testParser() {
6061
FunctionNode functionNode = (FunctionNode) function;
6162

6263
assertEquals("Main", functionNode.getName());
63-
assertEquals(0, functionNode.getChildren().size());
64+
assertEquals(1, functionNode.getChildren().size());
65+
assertTrue(functionNode.getChildren().get(0) instanceof NoOpNode);
6466
assertEquals(0, functionNode.getParameter().size());
6567
}
6668

0 commit comments

Comments
 (0)