make JS tests green

This commit is contained in:
Andreas Rumpf 2018-08-13 12:51:31 +02:00
commit 9f31096870
3 changed files with 3 additions and 3 deletions

View file

@ -48,4 +48,4 @@ for i in 1 .. 10:
let results = runCallbacks() let results = runCallbacks()
doAssert(expected == results) doAssert(expected == $results)

View file

@ -34,7 +34,7 @@ var
recurse1 = Recurse[int](data: 1, next: recurse2) recurse1 = Recurse[int](data: 1, next: recurse2)
doAssert test.name == "Jorden" doAssert test.name == cstring"Jorden"
doAssert knight.age == 19 doAssert knight.age == 19
doAssert knight.item.price == 50 doAssert knight.item.price == 50
doAssert recurse1.next.next.data == 3 doAssert recurse1.next.next.data == 3

View file

@ -64,7 +64,7 @@ block:
proc test(): bool = proc test(): bool =
let obj = newJsObject() let obj = newJsObject()
obj.`?!$` = proc(x, y, z: int, t: cstring): cstring = t & $(x + y + z) 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() echo test()
# Test JsObject []() # Test JsObject []()