Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
riley0122 committed Jun 3, 2024
1 parent d971cdc commit c5b2b38
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Tests/lexer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
#include <iostream>
#include <vector>

#define END '\n'

using namespace Orchid::Compiler::Frontend::Lexer;

bool testWhitespace() {
std::string input = " \t\n" + END;
std::string input = " \t\n";
auto tokens = getTokens(input);
return tokens.empty();
}

bool testIdentifiers() {
std::string input = "foo bar" + END;
std::string input = "foo bar\n";
auto tokens = getTokens(input);
return (
tokens.size() == 2 &&
Expand All @@ -23,7 +21,7 @@ bool testIdentifiers() {
}

bool testNumbers() {
std::string input = "123 456 890" + END;
std::string input = "123 456 890\n";
auto tokens = getTokens(input);
return (
tokens.size() == 3 &&
Expand Down

0 comments on commit c5b2b38

Please sign in to comment.