support List in reportDiff and comment out BLS and shuffling tests (#585)

* support List in report diff

* Json tests were removed but walkDirRec lull-ed us into thinking we were passing them :/
This commit is contained in:
Mamy Ratsimbazafy 2019-11-24 11:46:45 +01:00 committed by GitHub
parent 1938379bcd
commit 22adccc917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 6 deletions

View File

@ -30,7 +30,9 @@ import # Refactor state transition unit tests
./spec_block_processing/test_process_attestation,
./spec_epoch_processing/test_process_justification_and_finalization
import # Official fixtures that don't require SSZ parsing of invalid BLS signatures
# https://github.com/status-im/nim-beacon-chain/issues/374
./official/test_fixture_shuffling,
./official/test_fixture_bls
# TODO: json tests were removed
# import # Official fixtures that don't require SSZ parsing of invalid BLS signatures
# # https://github.com/status-im/nim-beacon-chain/issues/374
# ./official/test_fixture_shuffling,
# ./official/test_fixture_bls

View File

@ -92,7 +92,7 @@ proc inspectType(tImpl, xSubField, ySubField: NimNode, stmts: var NimNode) =
inspectType(tImpl[0], xSubField, ySubField, stmts)
of {nnkSym, nnkBracketExpr}:
if tImpl.kind == nnkBracketExpr:
assert tImpl[0].eqIdent"seq" or tImpl[0].eqIdent"array", "Error: unsupported generic type: " & $tImpl[0]
assert tImpl[0].eqIdent"List" or tImpl[0].eqIdent"seq" or tImpl[0].eqIdent"array", "Error: unsupported generic type: " & $tImpl[0]
compareContainerStmt(xSubField, ySubField, stmts)
elif $tImpl in builtinTypes:
compareStmt(xSubField, ySubField, stmts)

View File

@ -36,7 +36,6 @@ proc readValue*(r: var JsonReader, a: var seq[byte]) {.inline.} =
const
FixturesDir* = currentSourcePath.rsplit(DirSep, 1)[0] / "fixtures"
JsonTestsDir* = FixturesDir/"json_tests_v0.8.3"
SszTestsDir* = FixturesDir/"tests-v0.9.2"
proc parseTest*(path: string, Format: typedesc[Json or SSZ], T: typedesc): T =

View File

@ -46,6 +46,7 @@ proc readValue*(r: var JsonReader, a: var Domain) {.inline.} =
# (0.20)
a = hexToPaddedByteArray[8](r.readValue(string))
# TODO: json tests were removed
const BLSDir = JsonTestsDir/"general"/"phase0"/"bls"
suite "Official - BLS tests":

View File

@ -22,6 +22,7 @@ type
count*: uint64
mapping*: seq[uint64]
# TODO: json tests were removed
const ShufflingDir = JsonTestsDir/const_preset/"phase0"/"shuffling"/"core"/"shuffle"
suite "Official - Shuffling tests [Preset: " & preset():