From a8055b45d755360580b327fdecc393c66fc06061 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 8 Apr 2019 19:37:00 +0100 Subject: [PATCH] Check Dispose is called in C# auto_ptr test --- Examples/test-suite/csharp/li_std_auto_ptr_runme.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Examples/test-suite/csharp/li_std_auto_ptr_runme.cs b/Examples/test-suite/csharp/li_std_auto_ptr_runme.cs index 1f66042a6..863b86701 100644 --- a/Examples/test-suite/csharp/li_std_auto_ptr_runme.cs +++ b/Examples/test-suite/csharp/li_std_auto_ptr_runme.cs @@ -19,6 +19,13 @@ public class li_std_auto_ptr_runme { if (Klass.getTotal_count() != 2) throw new Exception("number of objects should be 2"); + using (Klass k3 = li_std_auto_ptr.makeKlassAutoPtr("second")) { + if (Klass.getTotal_count() != 3) + throw new Exception("number of objects should be 3"); + } + if (Klass.getTotal_count() != 2) + throw new Exception("number of objects should be 2"); + k1 = null; { int countdown = 500;