From 9f31096870103e93b23e17c4a68aa7dcdcc7889e Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 13 Aug 2018 12:51:31 +0200 Subject: [PATCH] make JS tests green --- tests/js/tclosures.nim | 2 +- tests/js/testobjs.nim | 2 +- tests/js/tjsffi.nim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/js/tclosures.nim b/tests/js/tclosures.nim index 67243c937c..659c60092f 100644 --- a/tests/js/tclosures.nim +++ b/tests/js/tclosures.nim @@ -48,4 +48,4 @@ for i in 1 .. 10: let results = runCallbacks() -doAssert(expected == results) +doAssert(expected == $results) diff --git a/tests/js/testobjs.nim b/tests/js/testobjs.nim index dd66825ec0..78f0b47666 100644 --- a/tests/js/testobjs.nim +++ b/tests/js/testobjs.nim @@ -34,7 +34,7 @@ var recurse1 = Recurse[int](data: 1, next: recurse2) -doAssert test.name == "Jorden" +doAssert test.name == cstring"Jorden" doAssert knight.age == 19 doAssert knight.item.price == 50 doAssert recurse1.next.next.data == 3 diff --git a/tests/js/tjsffi.nim b/tests/js/tjsffi.nim index 325ab6366c..156ca89e32 100644 --- a/tests/js/tjsffi.nim +++ b/tests/js/tjsffi.nim @@ -64,7 +64,7 @@ block: proc test(): bool = let obj = newJsObject() obj.`?!$` = proc(x, y, z: int, t: cstring): cstring = t & $(x + y + z) - obj.`?!$`(1, 2, 3, "Result is: ").to(cstring) == "Result is: 6" + obj.`?!$`(1, 2, 3, "Result is: ").to(cstring) == cstring"Result is: 6" echo test() # Test JsObject []()