From: Ivan Maidanski Date: Tue, 15 Nov 2016 22:13:30 +0000 (+0300) Subject: Add testing of new[]/delete[] (test_cpp) X-Git-Tag: v7.6.2~319 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b43ffcebd78fcc43cf3a402ddec42606e125603e;p=gc Add testing of new[]/delete[] (test_cpp) * tests/test_cpp.cc (main): Add test case for new[] and delete[]. --- diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 024efae4..0b1bbb7e 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