summary refs log tree commit diff stats
path: root/tests/vm/tconstobj.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-12-03 19:12:59 +0100
committerAraq <rumpf_a@web.de>2018-12-11 21:23:21 +0100
commit2a4c09ff8887350ec3fa283fe8d562e71b68406b (patch)
treebc09dd0a9b3960b1d4c194aa13d159711bd9a423 /tests/vm/tconstobj.nim
parentfb1f5c62b5e74b1a532ddfe9d6c373fc61eff878 (diff)
downloadNim-2a4c09ff8887350ec3fa283fe8d562e71b68406b.tar.gz
megatest can be executed
Diffstat (limited to 'tests/vm/tconstobj.nim')
-rw-r--r--tests/vm/tconstobj.nim22
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/vm/tconstobj.nim b/tests/vm/tconstobj.nim
index 38fcdd844..021fcb728 100644
--- a/tests/vm/tconstobj.nim
+++ b/tests/vm/tconstobj.nim
@@ -1,10 +1,12 @@
 discard """
-  output: '''(name: "hello")
-(-1, 0)'''
+  output: '''
+(name: "hello")
+(-1, 0)
+(FirstName: "James", LastName: "Franco")
+'''
 """
 
 # bug #2774, bug #3195
-
 type Foo = object
   name: string
 
@@ -14,7 +16,6 @@ const fooArray = [
 
 echo fooArray[0]
 
-
 type
     Position = object
         x, y: int
@@ -34,3 +35,16 @@ const
      ]
 
 echo offset[1]
+
+# bug #1547
+import tables
+
+type Person* = object
+    FirstName*: string
+    LastName*: string
+
+let people = {
+    "001": Person(FirstName: "James", LastName: "Franco")
+}.toTable()
+
+echo people["001"]