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

Builtin clock function not fully tested #1191

Open
xtreme-james-cooper opened this issue Feb 28, 2025 · 0 comments
Open

Builtin clock function not fully tested #1191

xtreme-james-cooper opened this issue Feb 28, 2025 · 0 comments

Comments

@xtreme-james-cooper
Copy link

xtreme-james-cooper commented Feb 28, 2025

I accidentally introduced a regression in my jlox interpreter - the one builtin function, clock, could take arbitrary arguments. I didn't notice for a bit since the jlox suite kept passing. The fix is pretty simple: add a test (in tests/function? in tests/regression?) to ensure clock errors if it is given arguments.

clock_args.lox:
clock(0); // expect runtime error: Expected 0 arguments but got 1.

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