test: fix redundant assertions in compiler_tests.rs - #1755
Closed
github-actions[bot] wants to merge 1 commit into
Closed
test: fix redundant assertions in compiler_tests.rs#1755github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
- Remove !compiled.contains("AWF_VERSION=\"0.27.9\"") assertion in
test_compiled_output_no_unreplaced_markers: always true while the
companion positive check on 0.27.32 passes, since AWF_VERSION is a
single constant in common.rs.
- Remove the for-loop checking !line.contains("host.docker.internal")
over --allow-domains lines: a strict subset of the global
!compiled.contains("host.docker.internal") assertion immediately above.
- Remove test_example_dogfood_failure_reporter_structure: reads the
example file for front-matter strings without compiling it — same
vacuous pattern as test_example_file_structure (removed in a prior run).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
Triage note (automated-PR sweep): not merging as-is. The AWF/host assertions removed here are genuinely redundant, but the PR also deletes the |
Collaborator
|
Closing rather than holding open for rework: the redundant-assertion cleanup here is entangled with deletion of the |
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: tests/compiler_tests.rs
What was wrong
test_compiled_output_no_unreplaced_markers(assertion 1):!compiled.contains("AWF_VERSION=\"0.27.9\"")is always true while the companioncompiled.contains("AWF_VERSION=\"0.27.32\"")passes.AWF_VERSIONis a single compile-time constant insrc/compile/common.rs— if the correct version is present, the wrong version cannot also be present. The negative check adds no detection value.test_compiled_output_no_unreplaced_markers(assertion 2): The for-loop asserting!line.contains("host.docker.internal")over every--allow-domainsline is a strict subset of the global!compiled.contains("host.docker.internal")assertion immediately above it. If the global check passes, the per-line loop is trivially satisfied; if the global check fails the test already aborts.test_example_dogfood_failure_reporter_structure: Readsexamples/dogfood-failure-reporter.mdand asserts on front-matter string patterns without compiling the file. This exercises no compiler behaviour — the same vacuous pattern astest_example_file_structure, which was removed in a prior test-reducer run.Changes
test_compiled_output_no_unreplaced_markerstest_compiled_output_no_unreplaced_markers--allow-domainsper-line loophost.docker.internalcheck above ittest_example_dogfood_failure_reporter_structureVerification
cargo test: all tests pass ✅cargo check --tests: no errors ✅Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comSee Network Configuration for more information.