[libcxx-commits] [PATCH] D76091: Move more tests to globalMemCounter and reset.

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 13 13:29:26 PDT 2020


EricWF reopened this revision.
EricWF added a comment.
This revision is now accepted and ready to land.

Some of the changes in this patch are not correct. Please revert them in a follow up commit.



================
Comment at: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp:33
 {
+    globalMemCounter.reset();
+    assert(globalMemCounter.checkOutstandingNewEq(0));
----------------
This change isn't correct.

The test was looking to ensure a *specific* overload of new/delete was replaceable and getting called.
It now checks that *any* overload is called.

Please revert this change.


================
Comment at: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp:35
+    globalMemCounter.reset();
+    assert(globalMemCounter.checkOutstandingNewEq(0));
     A *ap = new A[3];
----------------
This change isn't correct.

The test was looking to ensure a *specific* overload of new/delete was replaceable and getting called.
It now checks that *any* overload is called.

Please revert this change.


================
Comment at: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp:34
+    globalMemCounter.reset();
+    assert(globalMemCounter.checkOutstandingNewEq(0));
     A *ap = new (std::nothrow) A;
----------------
This change isn't correct.

The test was looking to ensure a *specific* overload of new/delete was replaceable and getting called.
It now checks that *any* overload is called.

Please revert this change.


================
Comment at: libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_replace.pass.cpp:21
 #include "test_macros.h"
 
 bool A_constructed = false;
----------------
This change isn't correct.

The test was looking to ensure a *specific* overload of new/delete was replaceable and getting called.
It now checks that *any* overload is called.

Please revert this change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76091/new/

https://reviews.llvm.org/D76091





More information about the libcxx-commits mailing list