From: Ivan Maidanski Date: Tue, 15 Nov 2016 22:13:30 +0000 (+0300) Subject: Add testing of new[]/delete[] (test_cpp) X-Git-Tag: v8.0.0~1037 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6028eb3df517e22b1a18cb35aea11a03256699b;p=platform%2Fupstream%2Flibgc.git 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 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