From a6028eb3df517e22b1a18cb35aea11a03256699b Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 16 Nov 2016 01:13:30 +0300 Subject: [PATCH] Add testing of new[]/delete[] (test_cpp) * tests/test_cpp.cc (main): Add test case for new[] and delete[]. --- tests/test_cpp.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 16b2d73..a8df17f 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -284,7 +284,10 @@ void* Undisguise( GC_word i ) { d = ::new (USE_GC, D::CleanUp, (void*)(GC_word)i) D( i ); (void)d; f = new F; - (void)f; + F** fa = new F*[1]; + fa[0] = f; + (void)fa; + delete[] fa; if (0 == i % 10) delete c;} /* Allocate a very large number of collectible As and Bs and -- 2.7.4