Skip to content

Test cleanup#37

Merged
HoneyPony merged 22 commits intomainfrom
test-cleanup
Jun 11, 2025
Merged

Test cleanup#37
HoneyPony merged 22 commits intomainfrom
test-cleanup

Conversation

@HoneyPony
Copy link
Owner

This does the following:

  • Makes every "error check" test actually do something, namely test for exact error messages.
  • Moves all the tests from tests/poni to tests/
  • Puts each subdirectory of tests inside its own mod { } in the generated rust code
  • Fixes any failing tests
    • ...although, there are still some tests that succeed but should fail in the future (e.g. globals::errTODO_bad_order)

HoneyPony added 22 commits June 9, 2025 21:42
At some point, we may wish to implement specific matching for errors,
because tests often should fail on a specific error. But anything is
better than nothing, and once this is done we can always grep for
//? to find all the tests to change later.

(Or, of course, they will just fail if we implement extra stuff that
they have to do, so we will just have to update them at that time).
The if_extra_parens test really should succeed, so we should probably
just fix that asap.

It's much easier than e.g. fixing errTODO_bad_order.
These tests were previously not run due to not being in a subdirectory.
Any tests that just test a program that should compile are fine enough
to run.

I've marked all the ones in the classes folder that are like this
as noout, but I'm not sure how necessary that is.
This is slightly more informative (e.g. now err_weird_var is failing)
but also more fragile. But, should be fine for now.
This makes writing the err_fun_missing_brace test possible.
I also implemented a few new tests for these.
This still doesn't seem to let the typechecker find the correct types
for these.
So now every time we promote something inside typecheck we need
to do it through self.promote() rather than expr.promote(). This
is necessary so that bottom types get promoted as if they were
unassigned.
This helps us narrow down the error in err_weird_var.
Before, the "no scope matches" case simply didn't report an error.
Now it does. This allows us to fix err_weird_var.
Until such time as we move all the tests to one folder (if we ever
decide to do that), this will at least make it easier to track down
failing tests by alphabetical order and so forth.
@HoneyPony HoneyPony merged commit 6a599b3 into main Jun 11, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant