test: reduce and improve tests in src/compile/types.rs#955
Draft
github-actions[bot] wants to merge 1 commit into
Draft
test: reduce and improve tests in src/compile/types.rs#955github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
- test_cache_memory_bool_false: add missing allowed_extensions().is_empty() assertion to match the symmetrical bool_true test - test_pr_trigger_config_empty_filters: extend to assert all 13 nullable PrFilters fields are None (was only checking 3 of 13) - test_pr_trigger_config_mode_explicit_synthetic: remove — its sole assertion (PrMode::Synthetic) is identical to test_pr_trigger_config_mode_default_synthetic; the mode-field trio (default_synthetic + explicit_policy + invalid_value_errors) fully covers the field without the redundant explicit-default variant Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Suite Reduction:
src/compile/types.rsWhat was wrong
test_cache_memory_bool_false: only asserted!cm.is_enabled(), missing thecm.allowed_extensions().is_empty()assertion that the symmetricaltest_cache_memory_bool_trueincludes. TheEnabled(false)variant'sallowed_extensions()code path was untested.test_pr_trigger_config_empty_filters: a test named "empty_filters" that claimed to verify afilters: {}block produces all-None fields — but only checked 3 of the 13 nullable fields onPrFilters(title,author,draft). Ten fields were silently skipped:source_branch,target_branch,commit_message,labels,changed_files,time_window,min_changes,max_changes,build_reason,expression.test_pr_trigger_config_mode_explicit_synthetic: its only assertion (assert_eq!(mode, PrMode::Synthetic)) is identical totest_pr_trigger_config_mode_default_synthetic. The existing mode-trio (default_synthetic+explicit_policy+invalid_value_errors) fully documents themode:field — the explicit-default variant adds no regression protection that the other three tests don't already provide.Changes
test_cache_memory_bool_falseallowed_extensions().is_empty()assertion; asymmetric withbool_truetest_pr_trigger_config_empty_filtersPrFiltersfieldstest_pr_trigger_config_mode_explicit_synthetictest_pr_trigger_config_mode_default_syntheticVerification
cargo test: 1820 tests pass ✅ (was 1821 — one redundant test removed)cargo clippy --all-targets --all-features: no errors or warnings ✅Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.