Repository navigation
test(objects): delete the object decoders' inline mirror suites, 1,021 lines - #433
Merged
Merged
Conversation
The inline #[cfg(test)] modules of 17 files under src/objects/ build synthetic bit streams in each decoder's own field layout and assert the fields they decode, or round-trip them through a hand-written encoder. They are unit tests, which this repository bans, and no job runs them since the Test job moved to tools/ci/run_test_targets.sh. Git history is the archive. acad_material's doc no longer says AcadMaterial is kept with its tests. The five object files an open pull request touches keep theirs until those land.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
acad_detail_view_style, acad_mleader_style, acad_section_view_style and acad_visual_style are the last users of modern::tests::r2004_object_prefix and write_inline_tv. modern.rs is touched by the open R13 pull requests, so the helpers stay, and with them these four suites, until those land: with their users gone the helpers are dead code in the lib test build, which -D warnings rejects (Test, windows-latest, stable).
3 tasks
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.
Summary
Unit-suite staged deletion, area object decoders. The inline
#[cfg(test)]modules of 13 files undersrc/objects/build synthetic bit streams in each decoder's own field layout and assert the fields they decode, or round-trip them through a hand-written encoder. They are unit tests, which this repository bans, and no job runs them since the Test job moved totools/ci/run_test_targets.sh(#428). Git history is the archive.Lines removed: 1,021 (50 tests; 1 line reworded). Production code is unchanged apart from one doc line: each file's only
#[cfg(test)]item is its test module, so no test-only helper goes with it.acad_material.rsdocumentedAcadMaterialas "kept with its tests"; it is public API thatMaterialsupersedes, so it stays and the line now says that.Skipped: files an open PR touches, and the four they pin
Checked against
gh pr list --state openat push time.control,class_map_extension,dictionary,modernandxrecordkeep their inline suites: feat(container): open and walk AC1012 (R13), pinned on 22 real drawings (#119) #323, feat(objects): R13 and R14 reference closure from the RL inside the common data (#84), stacked on #323 #324, fix(entities): R13 takes the R13-R14 branch of TEXT, VIEWPORT, TRACE, DIMSTYLE and LEADER (#119) #355, docs: the record types three R13 sets hold, and the ones still unmeasured (#119) #356, feat(entities): route MINSERT (8) and decode §20.4.10's grid fields (#141) #410 and feat(corpus): pin the 122 US Forest Service AC1012 drawings by Wayback URL (#345) #412 (the R13 stack) touch all five.objects/mod.rsandrender_environment.rshave no inline tests.acad_detail_view_style,acad_mleader_style,acad_section_view_styleandacad_visual_stylekeep theirs too, though no open PR touches them. Their test modules are the last users ofmodern::tests::r2004_object_prefixandwrite_inline_tv, two helpers inmodern.rs, a file the stack touches. Deleting those four suites leaves the helpers dead in the lib test build, which-D warningsrejects: the first push of this PR did exactly that (Test (windows-latest, stable),function r2004_object_prefix is never used), and the second commit restores the four. They go withmodern.rs.string_stream.rs, whosepub(crate) mod teststhe test modules of these files use, goes after the last of them.Coverage of the area
Every decoder here is self-validating: a field list must end exactly on the record's data-stream boundary, or it returns an error. What checks it now is the Corpus job, on every pinned drawing:
tools/corpus/baseline.tsv;tools/oracle/baseline.tsv), which has rows for LAYOUT (acad_layout), MLINESTYLE, SCALE, DICTIONARYVAR and ACDB_PLACEHOLDER among these files;canonical_corpusand the class-census probes on the committed canonical fixtures.The oracle has no row for
acad_group,acad_material,acad_plot_settings,acad_property_set_data,custom_dict_entry,proxy_entity,proxy_objectandxdata. For those, the check is the errored count, which only sees a type the pinned drawings contain; the deletion removes the only other check.Spec reference
Not a decoder change. No corpus count moves:
tools/corpus/baseline.tsvandtools/oracle/baseline.tsvare untouched.Test plan
cargo fmt --all -- --checkpasses (run locally; nothing else is built here).#[cfg(test)]module loses its last user (the failure above); CI is the compiler.--all-targets --all-features -D warnings, which builds the lib test target, where a helper left without a user fails as dead code), the six Test legs, Corpus (public DWG) withtools/corpus/baseline.tsvandtools/oracle/baseline.tsvunchanged, and Coverage smoke. This branch is based on main before chore(ci): class every tests/ target and run all but the unit ones #428, so its Test legs ran the oldcargo test; chore(ci): class every tests/ target and run all but the unit ones #428's run 40674359229 shows the classed runner, and CI runs again on this branch once chore(ci): class every tests/ target and run all but the unit ones #428 lands.Source-provenance declaration
By submitting this PR I certify that my contribution does not incorporate executable code from any source whose license is incompatible with Apache-2.0. Specifically:
CLEANROOM.md).dwg-rsis Apache-2.0 and must remain compatible.My contribution is based on:
See
CLEANROOM.mdfor the full allowed/forbidden source list and the honest scope of what "clean-room" means for this project.Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1. Specifically, I affirm that the contribution is my own work (or rightfully licensed to me) and that it can be distributed under the project's Apache-2.0 license.