-
Notifications
You must be signed in to change notification settings - Fork 2
Adds missing test for validating Species and Phase #228
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
Conversation
|
📄 Documentation for this branch is available at: https://ncar.github.io/MechanismConfiguration/branch/170-add-validation-tests/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors test naming conventions across the test suite, transitioning from generic ParserBase test fixture names to more descriptive, domain-specific test suite names (e.g., ParseSpecies, ParsePhases, ValidateWetDeposition). Additionally, it adds new validator tests for species, phases, and wet deposition reactions, improves error assertion patterns using std::multiset for order-independent error checking, and modernizes loop syntax with structured bindings.
- Renamed all test suites from
ParserBaseto descriptive names reflecting what they test - Added comprehensive validator tests for species, phases, and wet deposition functionality
- Improved error validation patterns using
std::multisetfor more robust testing - Updated loop patterns to use structured bindings for cleaner error iteration
Reviewed Changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/development/test_parse_species.cpp | Renamed test suite to ParseSpecies and ValidateSpecies; added validator tests covering missing keys, invalid keys, duplicates, and optional field validation; improved error assertions with multiset pattern |
| test/unit/development/test_parse_phases.cpp | Renamed test suite to ParsePhases and ValidatePhases; added validator tests for phases including duplicate detection, unknown species, and all validation scenarios; updated error checking patterns |
| test/unit/development/reactions/test_parse_wet_deposition.cpp | Renamed test suite to ParseWetDeposition and ValidateWetDeposition; added new validator tests for required keys and optional parameters |
| test/unit/development/reactions/test_parse_user_defined.cpp | Renamed test suites from ParserBase to ParseUserDefined and ValidateUserDefined |
| test/unit/development/reactions/test_parse_tunneling.cpp | Renamed test suites from ParserBase to ParseTunneling and ValidateTunneling |
| test/unit/development/reactions/test_parse_troe.cpp | Renamed test suites from ParserBase to ParserTroe and ValidateTroe |
| test/unit/development/reactions/test_parse_ternary_chemical_activation.cpp | Renamed test suites from ParserBase to ParserTernary and ValidateTernary |
| test/unit/development/reactions/test_parse_taylor_series.cpp | Renamed test suites from ParserBase to ParseTaylorSeries and ValidateTaylorSeries |
| test/unit/development/reactions/test_parse_surface.cpp | Renamed test suites from ParserBase to ParseSurface and ValidateSurface |
| test/unit/development/reactions/test_parse_simpol_phase_transfer.cpp | Renamed test suites from ParserBase to ParseSimpolPhaseTransfer and ValidateSimpolPhaseTransfer |
| test/unit/development/reactions/test_parse_photolysis.cpp | Renamed test suites from ParserBase to ParsePhotolysis and ValidatePhotolysis |
| test/unit/development/reactions/test_parse_henrys_law.cpp | Renamed test suites from ParserBase to ParseHenrysLaw and ValidateHenrysLaw |
| test/unit/development/reactions/test_parse_first_order_loss.cpp | Renamed test suites from ParserBase to ParseFirstOrderLoss and ValidateFirstOrderLoss |
| test/unit/development/reactions/test_parse_emission.cpp | Renamed test suites from ParserBase to ParseEmission and ValidateEmission |
| test/unit/development/reactions/test_parse_condensed_phase_photolysis.cpp | Renamed test suites from ParserBase to ParseCondensedPhasePhotolysis and ValidateCondensedPhasePhotolysis |
| test/unit/development/reactions/test_parse_condensed_phase_arrhenius.cpp | Renamed test suites from ParserBase to ParseCondensedPhaseArrhenius and ValidateCondensedPhaseArrhenius |
| test/unit/development/reactions/test_parse_branched.cpp | Renamed test suites from ParserBase to ParseBranched and ValidateBranched |
| test/unit/development/reactions/test_parse_arrhenius.cpp | Renamed test suites from ParserBase to ParseArrhenius and ValidateArrhenius |
| test/unit/development/reactions/test_parse_aqueous_equilibrium.cpp | Renamed test suites from ParserBase to ParseAqueousEquilibrium and ValidateAqueousEquilibrium |
| test/unit/development/models/test_parse_modal.cpp | Renamed test suite to ParseModal; removed unused mechanism variables; improved error assertion patterns with multiset |
| test/unit/development/models/test_parse_gas_model.cpp | Renamed test suite from ParserBase to ParseGas |
| test/integration/test_development_parser.cpp | Renamed test suite to ParseDevFullConfig; reordered reaction type assertions; added taylor_series and wet_deposition checks |
| include/mechanism_configuration/development/reaction_types.hpp | Added trailing whitespace to comment on line 105 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #228 +/- ##
=======================================
Coverage 79.31% 79.31%
=======================================
Files 4 4
Lines 29 29
=======================================
Hits 23 23
Misses 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR: