about summary refs log tree commit diff
path: root/users/fcuny/exp/monkey/pkg/lexer/lexer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'users/fcuny/exp/monkey/pkg/lexer/lexer_test.go')
-rw-r--r--users/fcuny/exp/monkey/pkg/lexer/lexer_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/users/fcuny/exp/monkey/pkg/lexer/lexer_test.go b/users/fcuny/exp/monkey/pkg/lexer/lexer_test.go
index df1b392..fdea1d3 100644
--- a/users/fcuny/exp/monkey/pkg/lexer/lexer_test.go
+++ b/users/fcuny/exp/monkey/pkg/lexer/lexer_test.go
@@ -22,6 +22,9 @@ if (5 < 10) {
 } else {
   return false;
 }
+
+10 == 10;
+10 != 9;
 `
 
 	tests := []struct {
@@ -96,6 +99,16 @@ if (5 < 10) {
 		{token.FALSE, "false"},
 		{token.SEMICOLON, ";"},
 		{token.RBRACE, "}"},
+
+		{token.INT, "10"},
+		{token.EQ, "=="},
+		{token.INT, "10"},
+		{token.SEMICOLON, ";"},
+
+		{token.INT, "10"},
+		{token.NOT_EQ, "!="},
+		{token.INT, "9"},
+		{token.SEMICOLON, ";"},
 	}
 
 	l := New(input)