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

Add a bunch of edge-case tests #1456

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add a bunch of edge-case tests #1456

wants to merge 4 commits into from

Conversation

WardBrian
Copy link
Member

@WardBrian WardBrian commented Oct 17, 2024

This adds tests for various edge cases in the compiler which were not previously tested.

These were found via mutation testing using a package called mutaml.

In addition to more tests, this PR also removes some dead code found by this method, and fixes a small bug in the typechecker error messaging for lupdf functions caused by a typo. I also made the test runner log the exit code of the tests into the output files, which is the majority of the diff here.

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.82%. Comparing base (1931ba6) to head (26acd24).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/frontend/Typechecker.ml 87.50% 1 Missing ⚠️
src/stan_math_backend/Lower_stmt.ml 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1456      +/-   ##
==========================================
+ Coverage   89.49%   89.82%   +0.32%     
==========================================
  Files          63       63              
  Lines       10618    10598      -20     
==========================================
+ Hits         9503     9520      +17     
+ Misses       1115     1078      -37     
Files with missing lines Coverage Δ
src/frontend/Deprecation_analysis.ml 80.00% <ø> (ø)
src/frontend/Preprocessor.ml 100.00% <100.00%> (+2.66%) ⬆️
src/middle/UnsizedType.ml 82.01% <100.00%> (+1.80%) ⬆️
src/middle/Utils.ml 86.48% <ø> (-1.61%) ⬇️
src/frontend/Typechecker.ml 92.95% <87.50%> (+1.17%) ⬆️
src/stan_math_backend/Lower_stmt.ml 95.65% <0.00%> (ø)

... and 8 files with indirect coverage changes

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