Skip to content

Commit

Permalink
test address is not valid with other chain codewords
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Nov 29, 2024
1 parent ac68008 commit e5496c6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/LinearCodeAddressGenerator_test.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ fun checkAddresses(
chainCodeWord: chainCodeWord
)
)

for otherChainCodeWord in LinearCodeAddressGenerator.codeWords.values {
if otherChainCodeWord == chainCodeWord {
continue
}

Test.assert(
!LinearCodeAddressGenerator.isValidAddress(
address,
chainCodeWord: otherChainCodeWord
)
)
}
}
}

Expand Down

0 comments on commit e5496c6

Please sign in to comment.