Skip to content

a check in unittest generated by template doesn't show actual valueΒ #6736

Closed
@alehander92

Description

@alehander92
import unittest

type
  A = object
    b: int

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

suite "0":
  test "1":

    var a = A(b: 0)
    check(a.b == 2)

suite "1":
  test "1":

    var a = A(b: 0)
    t()

[Suite] 0
t2.nim(14, 14): Check failed: a.b == 2
a.b was 0
[FAILED] 1

[Suite] 1
t2.nim(8, 12): Check failed: a.b == 2
[FAILED] 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions