feat(iace): norm cross-ref batches 2-5 (200 more → 500/671 covered)
- Batch 2: C-norms (woodworking, food, conveyors, lifts, agri, packaging) - Batch 3: machining, escalators, piping, boilers, wind/PV, refrigeration - Batch 4: paper sub-parts, playground (ASTM F1487), aircraft ground support, scaffolds, wire ropes, crane design EN 13001 - Batch 5: glass (EN 13035), ladders (ANSI A14), pools (APSP), explosives (DOT 49 CFR), amusement rides (ASTM F2291), drilling/foundation, eye protection (ANSI Z87.1), fire-fighting vehicles (NFPA 1901) 500 of 671 norms now have international identifier mappings. 171 remaining will be covered in batches 6-7 (alphabetically: EN-1870-x remainder onward plus ISO-x specials). Tests: TestCrossRef_BatchCoverage expects 500. All 8 cross-ref tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,10 +4,35 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCrossRef_Batch1_Coverage(t *testing.T) {
|
||||
// expectedCrossRefCount must be updated as batches are added.
|
||||
// Batches 1-5 × 100 = 500.
|
||||
const expectedCrossRefCount = 500
|
||||
|
||||
func TestCrossRef_BatchCoverage(t *testing.T) {
|
||||
all := ListNormCrossRefs()
|
||||
if len(all) != 100 {
|
||||
t.Fatalf("expected 100 cross-ref entries from batch 1, got %d", len(all))
|
||||
if len(all) != expectedCrossRefCount {
|
||||
t.Fatalf("expected %d cross-ref entries, got %d", expectedCrossRefCount, len(all))
|
||||
}
|
||||
}
|
||||
|
||||
func TestCrossRef_EN8120_HasASME(t *testing.T) {
|
||||
cr := GetNormCrossRef("EN-81-20")
|
||||
hasASME := false
|
||||
for _, m := range cr.Mappings {
|
||||
if m.Region == "US-ASME" {
|
||||
hasASME = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !hasASME {
|
||||
t.Error("EN-81-20 (lifts) should map to ASME A17.1 in US-ASME region")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCrossRef_EN13445_HasMultipleRegions(t *testing.T) {
|
||||
cr := GetNormCrossRef("EN-13445-1")
|
||||
if len(cr.Mappings) < 4 {
|
||||
t.Errorf("EN-13445-1 (pressure vessels) should have 4+ regional mappings, got %d", len(cr.Mappings))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user