diff options
Diffstat (limited to 'tests/js/tmangle.nim')
-rw-r--r-- | tests/js/tmangle.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/js/tmangle.nim b/tests/js/tmangle.nim index c4167ba39..caaa15fa1 100644 --- a/tests/js/tmangle.nim +++ b/tests/js/tmangle.nim @@ -27,10 +27,10 @@ block: var global = T(a: 11, b: "foo") proc test(): bool = var obj = T(a: 11, b: "foo") - {. emit: [result, " = (", obj.addr[], "[0].a == 11);"] .} - {. emit: [result, " = ", result, " && (", obj.addr[], "[0].b == \"foo\");"] .} - {. emit: [result, " = ", result, " && (", global, "[0].a == 11);"] .} - {. emit: [result, " = ", result, " && (", global, "[0].b == \"foo\");"] .} + {. emit: [result, " = (", obj.addr[], ".a == 11);"] .} + {. emit: [result, " = ", result, " && (", obj.addr[], ".b == \"foo\");"] .} + {. emit: [result, " = ", result, " && (", global, ".a == 11);"] .} + {. emit: [result, " = ", result, " && (", global, ".b == \"foo\");"] .} echo test() # Test addr of field: @@ -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.`==`.isNil() - result = result and obj2.`&&`.isNil() + result = result and obj2.`==`.isNil + result = result and obj2.`&&`.isNil echo test() # Test codegen for fields with uppercase letters: |