1234567891011121314151617181920212223242526 |
- #include "../Tests.hpp"
- struct NewTestClass {
- int i;
- };
- static void testNewArray() {
- NewTestClass* n = new NewTestClass[5];
- delete[] n;
- }
- static void testNewFlat() {
- NewTestClass* n = new NewTestClass();
- delete n;
- }
- static void testNewArrayWithSize() {
- NewTestClass* n = new NewTestClass[5];
- operator delete[](n, 5);
- }
- void Core::testNew() {
- testNewArray();
- testNewFlat();
- testNewArrayWithSize();
- }
|