From 7c778867a2f7e2e4b229c7d5ea275a3b73566731 Mon Sep 17 00:00:00 2001 From: coffeepots Date: Wed, 10 Oct 2018 17:26:32 +0100 Subject: [PATCH] Allow simpler json files to be processed, add dir sep for echo --- tests/test_helpers.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_helpers.nim b/tests/test_helpers.nim index 33841fd4c..421358539 100644 --- a/tests/test_helpers.nim +++ b/tests/test_helpers.nim @@ -105,7 +105,8 @@ proc lacksHomesteadPostStates*(filename: string): bool = fixture = child break - return fixture.has_key("transaction") and not fixture["post"].has_key("Homestead") + return fixture.kind == JObject and fixture.has_key("transaction") and + (fixture.has_key("post") and not fixture["post"].has_key("Homestead")) macro jsonTest*(s: static[string], handler: untyped): untyped = let @@ -129,7 +130,7 @@ macro jsonTest*(s: static[string], handler: untyped): untyped = for child in filenames: let (filename, folder, name) = child test filename: - echo folder, name + echo folder / name status[folder][name] = Status.FAIL try: `handler`(parseJSON(readFile(filename)), `testStatusIMPL`)