Skip to content

Commit

Permalink
test: never apply maximum nonce
Browse files Browse the repository at this point in the history
  • Loading branch information
sander committed Jan 31, 2024
1 parent d56d0c8 commit a309727
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/kotlin/NonceTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class NonceTest {
assertNull(Nonce(ULong.MAX_VALUE).increment())
}

@Test
fun `never increment to 2^64-1 which is reserved for other use`() {
assertNull(Nonce(ULong.MAX_VALUE - 1uL).increment())
}

@Test
fun testEncodeLittleEndian() {
assertEquals((0uL).toLong(), 0L)
Expand Down

0 comments on commit a309727

Please sign in to comment.