projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19d8238
)
Add testing of new[]/delete[] (test_cpp)
author
Ivan Maidanski
<ivmai@mail.ru>
Tue, 15 Nov 2016 22:13:30 +0000
(
01:13
+0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Tue, 15 Nov 2016 22:13:30 +0000
(
01:13
+0300)
* tests/test_cpp.cc (main): Add test case for new[] and delete[].
tests/test_cpp.cc
patch
|
blob
|
history
diff --git
a/tests/test_cpp.cc
b/tests/test_cpp.cc
index
16b2d73
..
a8df17f
100644
(file)
--- 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