mirror of
https://github.com/logos-storage/nim-leopard.git
synced 2026-01-04 06:33:09 +00:00
more tests
This commit is contained in:
parent
61be6c4bcb
commit
302a114d35
@ -4,7 +4,7 @@ import pkg/stew/byteutils
|
|||||||
|
|
||||||
import ../leopard
|
import ../leopard
|
||||||
|
|
||||||
suite "Parametrization":
|
suite "Leopard Parametrization":
|
||||||
test "Should not allow invalid buffer multiples":
|
test "Should not allow invalid buffer multiples":
|
||||||
check:
|
check:
|
||||||
LeoEncoder.init(63, 4, 2).error == "bufSize should be multiples of 64 bytes!"
|
LeoEncoder.init(63, 4, 2).error == "bufSize should be multiples of 64 bytes!"
|
||||||
@ -63,7 +63,7 @@ suite "Parametrization":
|
|||||||
check:
|
check:
|
||||||
leo.decode(data, parity, recovered).error == "Number of recovered buffers should match buffers!"
|
leo.decode(data, parity, recovered).error == "Number of recovered buffers should match buffers!"
|
||||||
|
|
||||||
suite "Leopard Encode/Decode":
|
suite "Leopard simple Encode/Decode":
|
||||||
const
|
const
|
||||||
TestString = "Hello World!"
|
TestString = "Hello World!"
|
||||||
DataCount = 4
|
DataCount = 4
|
||||||
@ -138,3 +138,6 @@ suite "Leopard Encode/Decode":
|
|||||||
decoder.decode(data, parity, recovered).tryGet()
|
decoder.decode(data, parity, recovered).tryGet()
|
||||||
|
|
||||||
check recovered[0] == data1
|
check recovered[0] == data1
|
||||||
|
|
||||||
|
suite "Leopard Encode/Decode":
|
||||||
|
discard
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user