Skip to content

Commit 827e21e

Browse files
committed
test(ifc): pin RE1 NominalDiameter oracle counts in B44 test
Assert the reference export yields the known 42 Plumbing fittings (and zero on Mechanical) once corpus files exist, so a parser miss cannot pass with zero comparisons.
1 parent 8fe1d98 commit 827e21e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎tests/fitting_nominal_diameter.rs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ fn re1_fitting_nominal_diameters_are_revits() {
155155
};
156156
let mut compared = 0;
157157
let mut failures = Vec::new();
158-
for model in ["Plumbing", "Mechanical"] {
158+
for (model, expected) in [("Plumbing", 42), ("Mechanical", 0)] {
159159
let rvt = dir.join(format!("RE1-{model}.rvt"));
160160
let reference = dir.join(format!("RE1-{model}.ifc"));
161161
if !rvt.exists() || !reference.exists() {
@@ -164,6 +164,11 @@ fn re1_fitting_nominal_diameters_are_revits() {
164164
}
165165
let theirs =
166166
nominal_diameters(&std::fs::read_to_string(&reference).expect("reference IFC"));
167+
assert_eq!(
168+
theirs.values().filter(|v| v.is_some()).count(),
169+
expected,
170+
"RE1 {model}: pipe fittings with Revit's NominalDiameter in the reference export"
171+
);
167172
let mut rf = RevitFile::open(&rvt).expect("open");
168173
let result = RvtDocExporter
169174
.export_with_diagnostics(&mut rf)

0 commit comments

Comments
 (0)