Skip to content

Commit

Permalink
test: more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
silverhairs committed Aug 5, 2023
1 parent 4de3a43 commit 1086a0a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions glox/ast/print_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ func TestPrint(t *testing.T) {
Name: token.Token{Type: token.IDENTIFIER, Lexeme: "number", Line: 1},
Value: NewLiteralExpression(12),
},
&Logical{
Left: &Literal{Value: true},
Operator: token.Token{Type: token.AND, Lexeme: "and", Line: 1},
Right: &Literal{Value: false},
},
&Logical{
Left: &Literal{Value: true},
Operator: token.Token{Type: token.OR, Lexeme: "or", Line: 1},
Right: &Literal{Value: false},
},
}
printer := NewPrinter()

Expand Down

0 comments on commit 1086a0a

Please sign in to comment.