Skip to content

Comments

Add a bunch of edge-case tests#1456

Merged
WardBrian merged 4 commits intomasterfrom
test-coverage
Oct 28, 2024
Merged

Add a bunch of edge-case tests#1456
WardBrian merged 4 commits intomasterfrom
test-coverage

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)

@codecov
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 7 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

@WardBrian WardBrian merged commit 5692dc4 into master Oct 28, 2024
@WardBrian WardBrian deleted the test-coverage branch October 28, 2024 15:57
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.

2 participants