|
From 80c360fceb367e8b39dd8534313001e5cef4fa7f Mon Sep 17 00:00:00 2001 From: hlaaftana <10591326+hlaaftana@users.noreply.github.com> Date: Fri, 15 May 2020 11:07:30 +0300 Subject: fix #14350, cstrings in JS init as null (#14355) * fix #14350, cstrings in JS init as null --- tests/js/tmangle.nim | 4 ++-- tests/js/trepr.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/js') diff --git a/tests/js/tmangle.nim b/tests/js/tmangle.nim index 393043722..caaa15fa1 100644 --- a/tests/js/tmangle.nim +++ b/tests/js/tmangle.nim @@ -62,8 +62,8 @@ block: result = result and obj1.`&&`.addr[] == "bar".cstring result = result and obj2.`if` == 0 result = result and obj2.`for` == 0 - result = result and obj2.`==`.len == 0 - result = result and obj2.`&&`.len == 0 + result = result and obj2.`==`.isNil + result = result and obj2.`&&`.isNil echo test() # Test codegen for fields with uppercase letters: diff --git a/tests/js/trepr.nim b/tests/js/trepr.nim index ffa9d4de0..eb285f70d 100644 --- a/tests/js/trepr.nim +++ b/tests/js/trepr.nim @@ -322,7 +322,7 @@ o = [Field0 = [a = "", b = @[]], Field1 = ""], p = nil, -q = ""] +q = nil] """) doAssert(repr(cc) == """ [a = 12, -- cgit 1.4.1-2-gfad0 ng/Nim/refs/?h=devel&id=1d66222901f0812bf5ffd5fc4e8175acb1948c9e'>refs log blame commit diff stats