update test suite to 0.9.4 vectors
This commit is contained in:
parent
106352aff3
commit
3e7d56a66f
|
@ -1 +1 @@
|
||||||
Subproject commit ce78f963a1da1b747a10bb027a8b438b3c679586
|
Subproject commit 330d343cb5e5c68e16eb57963e46d64a424751e6
|
|
@ -36,7 +36,7 @@ proc readValue*(r: var JsonReader, a: var seq[byte]) {.inline.} =
|
||||||
|
|
||||||
const
|
const
|
||||||
FixturesDir* = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
|
FixturesDir* = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
|
||||||
SszTestsDir* = FixturesDir/"tests-v0.9.3"
|
SszTestsDir* = FixturesDir/"tests-v0.9.4"
|
||||||
|
|
||||||
proc parseTest*(path: string, Format: typedesc[Json or SSZ], T: typedesc): T =
|
proc parseTest*(path: string, Format: typedesc[Json or SSZ], T: typedesc): T =
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -20,7 +20,7 @@ const
|
||||||
SpecDir = currentSourcePath.rsplit(DirSep, 1)[0] /
|
SpecDir = currentSourcePath.rsplit(DirSep, 1)[0] /
|
||||||
".."/".."/"beacon_chain"/"spec"
|
".."/".."/"beacon_chain"/"spec"
|
||||||
FixturesDir = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
|
FixturesDir = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
|
||||||
Config = FixturesDir/"tests-v0.9.3"/const_preset/"config.yaml"
|
Config = FixturesDir/"tests-v0.9.4"/const_preset/"config.yaml"
|
||||||
|
|
||||||
type
|
type
|
||||||
CheckedType = SomeInteger or Slot or Epoch
|
CheckedType = SomeInteger or Slot or Epoch
|
||||||
|
@ -119,5 +119,5 @@ proc checkConfig() =
|
||||||
else:
|
else:
|
||||||
check: ConstsToCheck[constant] == value.getBiggestInt().uint64()
|
check: ConstsToCheck[constant] == value.getBiggestInt().uint64()
|
||||||
|
|
||||||
suite "Official - 0.9.3 - constants & config " & preset():
|
suite "Official - 0.9.4 - constants & config " & preset():
|
||||||
checkConfig()
|
checkConfig()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# beacon_chain
|
# beacon_chain
|
||||||
# Copyright (c) 2018 Status Research & Development GmbH
|
# Copyright (c) 2018-2019 Status Research & Development GmbH
|
||||||
# Licensed and distributed under either of
|
# Licensed and distributed under either of
|
||||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
|
@ -26,7 +26,7 @@ import
|
||||||
|
|
||||||
const
|
const
|
||||||
FixturesDir = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
|
FixturesDir = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
|
||||||
SSZDir = FixturesDir/"tests-v0.9.3"/const_preset/"phase0"/"ssz_static"
|
SSZDir = FixturesDir/"tests-v0.9.4"/const_preset/"phase0"/"ssz_static"
|
||||||
|
|
||||||
type
|
type
|
||||||
SSZHashTreeRoot = object
|
SSZHashTreeRoot = object
|
||||||
|
@ -102,5 +102,5 @@ proc runSSZtests() =
|
||||||
else:
|
else:
|
||||||
raise newException(ValueError, "Unsupported test: " & sszType)
|
raise newException(ValueError, "Unsupported test: " & sszType)
|
||||||
|
|
||||||
suite "Official - 0.9.3 - SSZ consensus objects " & preset():
|
suite "Official - 0.9.4 - SSZ consensus objects " & preset():
|
||||||
runSSZtests()
|
runSSZtests()
|
||||||
|
|
|
@ -23,7 +23,7 @@ import
|
||||||
|
|
||||||
const
|
const
|
||||||
FixturesDir = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
|
FixturesDir = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
|
||||||
SSZDir = FixturesDir/"tests-v0.9.3"/"general"/"phase0"/"ssz_generic"
|
SSZDir = FixturesDir/"tests-v0.9.4"/"general"/"phase0"/"ssz_generic"
|
||||||
|
|
||||||
type
|
type
|
||||||
SSZHashTreeRoot = object
|
SSZHashTreeRoot = object
|
||||||
|
@ -278,5 +278,5 @@ proc runSSZtests() =
|
||||||
# test "Testing " & name & " inputs (" & $T & ") - invalid":
|
# test "Testing " & name & " inputs (" & $T & ") - invalid":
|
||||||
# const path = SSZDir/name/"invalid"
|
# const path = SSZDir/name/"invalid"
|
||||||
|
|
||||||
suite "Official - 0.9.3 - SSZ generic types":
|
suite "Official - 0.9.4 - SSZ generic types":
|
||||||
runSSZtests()
|
runSSZtests()
|
||||||
|
|
Loading…
Reference in New Issue