The client for Voice over IRC. Can't let those newfangled social networks win, eh?
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

message_test.nim 416B

12345678910111213141516
  1. import message
  2. const BYTES_PER_MESSAGE = 312
  3. var input = newSeq[cuchar](0)
  4. for i in 0..<BYTES_PER_MESSAGE:
  5. add(input, cuchar((i and 0x1E) + 67))
  6. let tmp = message.encode(input, input.len)
  7. let output = message.decode(tmp)
  8. for i in 0..<BYTES_PER_MESSAGE:
  9. if input[i] != output[i]:
  10. echo("MISMATCH @ ", i, ": ", input[i], " != ", output[i])
  11. else:
  12. echo("MATCH @ ", i, ": ", input[i], " == ", output[i])