From 8a09e97d4d1f65c528e39f0d0ff3876e42f82233 Mon Sep 17 00:00:00 2001 From: andri lim Date: Sat, 26 Oct 2019 08:24:05 +0700 Subject: [PATCH] add diagnostic message to test_difficulty.nim --- tests/test_difficulty.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_difficulty.nim b/tests/test_difficulty.nim index 49b89795b..787afec08 100644 --- a/tests/test_difficulty.nim +++ b/tests/test_difficulty.nim @@ -50,7 +50,7 @@ template runTests(name: string, hex: bool, calculator: typed) = ommersHash: t.parentUncles) let diff = calculator(times.fromUnix(t.currentTimeStamp), p) - test title: + test name & " " & title: check diff == t.currentDifficulty proc difficultyMain*() = @@ -60,3 +60,6 @@ proc difficultyMain*() = runTests("Homestead", true, calcDifficultyHomestead) runTests("Frontier", true, calcDifficultyFrontier) runTests("", false, calcDifficulty) + +when isMainModule: + difficultyMain()