Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loop over generated output rather than the expected output #65

Open
ishank-s opened this issue May 28, 2023 · 0 comments
Open

loop over generated output rather than the expected output #65

ishank-s opened this issue May 28, 2023 · 0 comments

Comments

@ishank-s
Copy link

ishank-s commented May 28, 2023

if you loop over expected output and an extra element is returned from lexer tests still passes. So it should be otherway around?
I think
sol -

 var index: usize = 0;
   while (true) : (index += 1) {
        const tok = lex.next_token();
        var token = Token.illegal;
        if (tokens.len < index) {
            token = tokens[index];
        }
        try expectEqualDeep(token, tok);
        if (tok == .eof) {
            break;
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant