enable --gc:orc testing (#49)
This commit is contained in:
parent
a065c17418
commit
b602bd469b
|
@ -117,7 +117,7 @@ block:
|
||||||
var ectx, dctx: CFB[aes256]
|
var ectx, dctx: CFB[aes256]
|
||||||
var key = newString(aes256.sizeKey)
|
var key = newString(aes256.sizeKey)
|
||||||
var iv = newString(aes256.sizeBlock)
|
var iv = newString(aes256.sizeBlock)
|
||||||
var plainText = aliceData
|
var plainText = newString(len(aliceData))
|
||||||
var encText = newString(len(aliceData))
|
var encText = newString(len(aliceData))
|
||||||
var decText = newString(len(aliceData))
|
var decText = newString(len(aliceData))
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,10 @@ block:
|
||||||
var key = newString(aes256.sizeKey)
|
var key = newString(aes256.sizeKey)
|
||||||
var iv = newString(aes256.sizeBlock)
|
var iv = newString(aes256.sizeBlock)
|
||||||
# We do not need to pad data, `CTR` mode works byte by byte.
|
# We do not need to pad data, `CTR` mode works byte by byte.
|
||||||
var plainText = aliceData
|
var plainText = newString(len(aliceData))
|
||||||
|
|
||||||
|
copyMem(addr plainText[0], addr aliceData[0], len(aliceData))
|
||||||
|
|
||||||
var encText = newString(len(aliceData))
|
var encText = newString(len(aliceData))
|
||||||
var decText = newString(len(aliceData))
|
var decText = newString(len(aliceData))
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ block:
|
||||||
var ectx, dctx: OFB[aes256]
|
var ectx, dctx: OFB[aes256]
|
||||||
var key = newString(aes256.sizeKey)
|
var key = newString(aes256.sizeKey)
|
||||||
var iv = newString(aes256.sizeBlock)
|
var iv = newString(aes256.sizeBlock)
|
||||||
var plainText = aliceData
|
var plainText = newString(len(aliceData))
|
||||||
var encText = newString(len(aliceData))
|
var encText = newString(len(aliceData))
|
||||||
var decText = newString(len(aliceData))
|
var decText = newString(len(aliceData))
|
||||||
|
|
||||||
|
|
|
@ -13,18 +13,25 @@ requires "nim > 0.18.0"
|
||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
task test, "Runs the test suite":
|
task test, "Runs the test suite":
|
||||||
let testCommands = @[
|
var testCommands = @[
|
||||||
"nim c -f -r tests/",
|
"nim c -f -r tests/",
|
||||||
"nim c -f -d:danger -r tests/",
|
"nim c -f -d:danger -r tests/",
|
||||||
"nim c -f -d:danger --threads:on -r tests/",
|
"nim c -f -d:danger --threads:on -r tests/",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
when (NimMajor, NimMinor) >= (1, 5):
|
||||||
|
testCommands.add "nim c -f --gc:orc --threads:on -r tests/"
|
||||||
|
|
||||||
let exampleFiles = @[
|
let exampleFiles = @[
|
||||||
"ecb", "cbc", "ofb", "cfb", "ctr", "gcm"
|
"ecb", "cbc", "ofb", "cfb", "ctr", "gcm"
|
||||||
]
|
]
|
||||||
let exampleCommands = @[
|
var exampleCommands = @[
|
||||||
"nim c -f -r --threads:on examples/",
|
"nim c -f -r --threads:on examples/",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
when (NimMajor, NimMinor) >= (1, 5):
|
||||||
|
exampleCommands.add "nim c -f --gc:orc --threads:on -r examples/"
|
||||||
|
|
||||||
for cmd in testCommands:
|
for cmd in testCommands:
|
||||||
echo "\n" & cmd & "testall"
|
echo "\n" & cmd & "testall"
|
||||||
exec cmd & "testall"
|
exec cmd & "testall"
|
||||||
|
|
Loading…
Reference in New Issue