File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Codex/src/test/java/org/operatorfoundation/codex Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -408,4 +408,34 @@ class SymbolTest {
408408 assertEquals(0 , Required (' Q' ).size())
409409 assertEquals(3 , Trinary .size())
410410 }
411+
412+ // @Test
413+ // fun testRequiredSymbolValidation()
414+ // {
415+ // // Test that Required symbol validates correctly
416+ // val decoder = Decoder(listOf(Required('X'.code.toByte()), Number()))
417+ //
418+ // // Should decode successfully with 'X'
419+ // val validInput = listOf("X".toByteArray(), "5".toByteArray())
420+ // val result = decoder.decode(validInput)
421+ // assertEquals(BigInteger.valueOf(5), result)
422+ //
423+ // // Should throw with wrong required character
424+ // val invalidInput = listOf("Y".toByteArray(), "5".toByteArray())
425+ // assertThrows(IllegalArgumentException::class.java) {
426+ // decoder.decode(invalidInput)
427+ // }
428+ // }
429+ //
430+ // @Test
431+ // fun testEncoderOverflow()
432+ // {
433+ // // Test that encoder throws when value is too large
434+ // val encoder = Encoder(listOf(Binary(), Binary())) // Max value = 3
435+ //
436+ // assertThrows(Exception::class.java) {
437+ // encoder.encode(BigInteger.valueOf(4))
438+ // }
439+ // }
440+
411441}
You can’t perform that action at this time.
0 commit comments