summary refs log tree commit diff stats
path: root/tests/js/taddr.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/taddr.nim')
-rw-r--r--tests/js/taddr.nim8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/js/taddr.nim b/tests/js/taddr.nim
index 6a60aa902..f9c89fbc3 100644
--- a/tests/js/taddr.nim
+++ b/tests/js/taddr.nim
@@ -1,3 +1,7 @@
+discard """
+  action: run
+"""
+
 type T = object
   x: int
   s: string
@@ -29,8 +33,10 @@ doAssert objDeref.x == 42
 obj.s = "lorem ipsum dolor sit amet"
 var indexAddr = addr(obj.s[2])
 
-doAssert indexAddr[] == '4'
+doAssert indexAddr[] == 'r'
 
 indexAddr[] = 'd'
 
 doAssert indexAddr[] == 'd'
+
+doAssert obj.s == "lodem ipsum dolor sit amet"