summary refs log blame commit diff stats
path: root/tests/stdlib/tunittesttemplate.nim
blob: c29e0de01bff92f2be614465505561c9e8a58061 (plain) (tree)
1
2
3
4
5
6
7
8
9


                
                                                         




             
 
 

                   











                     
discard """
  exitcode: 1
  outputsub: '''
    tunittesttemplate.nim(20, 12): Check failed: a.b == 2
    a.b was 0
  [FAILED] 1
'''
"""



# bug #6736
import std/unittest

type
  A = object
    b: int

template t: untyped =
  check(a.b == 2)

suite "1":
  test "1":
    var a = A(b: 0)
    t()