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

Improve precision in 02-prims.t tests (and others) #361

Open
masak opened this issue Jul 10, 2021 · 1 comment
Open

Improve precision in 02-prims.t tests (and others) #361

masak opened this issue Jul 10, 2021 · 1 comment

Comments

@masak
Copy link
Owner

masak commented Jul 10, 2021

In 02-prims.t, we're testing with ~~mem because we only care about "is it a member or not"? But we could restate all those tests as searches instead, and get a more meaningful number back. (The index of the element list in which we found a match.)

Also, go through the other instances of ~~ in other test files, and see if we can similarly lift them into something more meaningful. Maybe in some cases we can simply group them into a single test instead of testing things one by one.

@masak
Copy link
Owner Author

masak commented Nov 15, 2023

(The index of the element list in which we found a match.)

I'm not sure I like that idea, 2-and-some years later. Who cares about the index? Why make the test brittle in that particular way?

That said, I do think those tests can be rephrased. Maybe we can conditionally push the corresponding symbol to a list, do a quick diff with the expected list and test that this diff is empty?

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