summary refs log tree commit diff stats
path: root/tests/js
diff options
context:
space:
mode:
authorhlaaftana <10591326+hlaaftana@users.noreply.github.com>2020-05-15 11:07:30 +0300
committerGitHub <noreply@github.com>2020-05-15 10:07:30 +0200
commit80c360fceb367e8b39dd8534313001e5cef4fa7f (patch)
treed93698a45b9f82b16bf5f05aef8112373ff46d9f /tests/js
parent278b4582f5c7cc3471bccc4ba587030edf7a50e2 (diff)
downloadNim-80c360fceb367e8b39dd8534313001e5cef4fa7f.tar.gz
fix #14350, cstrings in JS init as null (#14355)
* fix #14350, cstrings in JS init as null
Diffstat (limited to 'tests/js')
-rw-r--r--tests/js/tmangle.nim4
-rw-r--r--tests/js/trepr.nim2
2 files changed, 3 insertions, 3 deletions
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,