Skip to content

Commit e5496c6

Browse files
committed
test address is not valid with other chain codewords
1 parent ac68008 commit e5496c6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/LinearCodeAddressGenerator_test.cdc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ fun checkAddresses(
4848
chainCodeWord: chainCodeWord
4949
)
5050
)
51+
52+
for otherChainCodeWord in LinearCodeAddressGenerator.codeWords.values {
53+
if otherChainCodeWord == chainCodeWord {
54+
continue
55+
}
56+
57+
Test.assert(
58+
!LinearCodeAddressGenerator.isValidAddress(
59+
address,
60+
chainCodeWord: otherChainCodeWord
61+
)
62+
)
63+
}
5164
}
5265
}
5366

0 commit comments

Comments
 (0)