summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib')
-rw-r--r--tests/stdlib/tunittest.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/stdlib/tunittest.nim b/tests/stdlib/tunittest.nim
index 86b9fd037..c8656bbff 100644
--- a/tests/stdlib/tunittest.nim
+++ b/tests/stdlib/tunittest.nim
@@ -13,6 +13,8 @@ discard """
 
 [Suite] bug #5784
 
+[Suite] test suite
+
 [Suite] test name filtering
 
 '''
@@ -123,6 +125,23 @@ suite "bug #5784":
     var obj: Obj
     check obj.isNil or obj.field == 0
 
+type
+    SomeType = object
+        value: int
+        children: seq[SomeType]
+
+# bug #5252
+
+proc `==`(a, b: SomeType): bool =
+    return a.value == b.value
+
+suite "test suite":
+    test "test":
+        let a = SomeType(value: 10)
+        let b = SomeType(value: 10)
+
+        check(a == b)
+
 when defined(testing):
   suite "test name filtering":
     test "test name":