From 8443f1b3852df42579ba78aff8d134af486c0052 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 11 Jun 2017 09:45:33 +0200 Subject: [PATCH] Make test functions nogc --- source/tanya/memory/types.d | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/tanya/memory/types.d b/source/tanya/memory/types.d index 1016d5e..9a98464 100644 --- a/source/tanya/memory/types.d +++ b/source/tanya/memory/types.d @@ -340,7 +340,7 @@ version (unittest) } } -private unittest +private @nogc unittest { uint destroyed; auto a = defaultAllocator.make!A(destroyed); @@ -350,7 +350,7 @@ private unittest auto rc = RefCounted!A(a, defaultAllocator); assert(rc.count == 1); - void func(RefCounted!A rc) + void func(RefCounted!A rc) @nogc { assert(rc.count == 2); } @@ -378,7 +378,7 @@ private @nogc unittest auto rc = defaultAllocator.refCounted!int(5); assert(rc.count == 1); - void func(RefCounted!int rc) + void func(RefCounted!int rc) @nogc { assert(rc.count == 2); rc = null; @@ -400,7 +400,7 @@ private unittest auto rc = defaultAllocator.refCounted!int(5); assert(*rc == 5); - void func(RefCounted!int rc) + void func(RefCounted!int rc) @nogc { assert(rc.count == 2); rc = defaultAllocator.refCounted!int(4); @@ -511,7 +511,7 @@ unittest auto rc = defaultAllocator.refCounted!int(5); assert(rc.count == 1); - void func(RefCounted!int param) + void func(RefCounted!int param) @nogc { if (param.count == 2) {