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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 13 14:01:31 PDT 2020


ldionne added inline comments.


================
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));
----------------
EricWF wrote:
> 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.
Wait, how's that true? The only `operator new` that modifies the result of `globalMemCounter.checkOutstandingNewEq` in `count_new.h` is `void* operator new(std::size_t s) TEST_THROW_SPEC(std::bad_alloc)`, which is the same as here, no?

Other overloads of `new` have different counters, don't they?


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