test(roles): rank namespace check without double negation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
This commit is contained in:
1 parent
bef4e31c05
commit
b7608e07ba
1 file changed
+3
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user