test(roles): rank namespace check without double negation
ci / shared (pull_request) Successful in 13s
ci / test (pull_request) Successful in 7m0s
ci / image (pull_request) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-11-16 12:49:51 +01:00
1 parent bef4e31c05
commit b7608e07ba
1 file changed
+3 -1
+3 -1
View File
@@ -67,7 +67,9 @@ func TestCatalogue_unionOfA1AndA4(t *testing.T) {
rows[f.D02Row] = true
}
// Keys are namespaced by the rank that defines them (Nr. 2: R2, R5).
if !strings.HasPrefix(f.Code, "r1.") && !(slices.Contains(f.Sources, "B2") && (strings.HasPrefix(f.Code, "r2.") || strings.HasPrefix(f.Code, "r5."))) {
rank := strings.HasPrefix(f.Code, "r1.") ||
slices.Contains(f.Sources, "B2") && (strings.HasPrefix(f.Code, "r2.") || strings.HasPrefix(f.Code, "r5."))
if !rank {
t.Errorf("%s: keys are namespaced by their rank", f.Code)
}
}