diff --git a/alib2common/makefile b/alib2common/makefile index 844acb01e3fe692f6ac13ecadfc67c5db18fc116..14a7255ce0fb49aac6a710719bb69dfb335e155c 100644 --- a/alib2common/makefile +++ b/alib2common/makefile @@ -149,8 +149,9 @@ obj-debug/: FORCE obj-debug/makefile obj-release/: FORCE obj-release/makefile $(MAKE) -C $@ OBJECTS_BASE_DIR=$(realpath obj-release) SOURCES_BASE_DIR=$(realpath src) CXX_OTHER_FLAGS="-O3 -DNDEBUG -DRELEASE" +# O0 here not to optimize measurement tests test-obj-debug/: FORCE test-obj-debug/makefile - $(MAKE) -C $@ OBJECTS_BASE_DIR=$(realpath test-obj-debug) SOURCES_BASE_DIR=$(realpath test-src) CXX_OTHER_FLAGS="-g -Og -DDEBUG" + $(MAKE) -C $@ OBJECTS_BASE_DIR=$(realpath test-obj-debug) SOURCES_BASE_DIR=$(realpath test-src) CXX_OTHER_FLAGS="-g -O0 -DDEBUG" test-obj-release/: FORCE test-obj-release/makefile $(MAKE) -C $@ OBJECTS_BASE_DIR=$(realpath test-obj-release) SOURCES_BASE_DIR=$(realpath test-src) CXX_OTHER_FLAGS="-O3 -DNDEBUG -DRELEASE" diff --git a/alib2common/test-src/measurements/MeasurementsTest.cpp b/alib2common/test-src/measurements/MeasurementsTest.cpp index cec34aef6bbab9bc240fc96deafaf29b18fe0573..71d33b95684b4dc7912482733b27a4d360eb940b 100644 --- a/alib2common/test-src/measurements/MeasurementsTest.cpp +++ b/alib2common/test-src/measurements/MeasurementsTest.cpp @@ -84,9 +84,7 @@ void MeasurementsTest::testMemoryMeasurements ( ) { measurements::start ( "chunk1", measurements::Type::MAIN ); int * baz = new int[500]; - measurements::end ( ); - delete[] baz; int * foo = new int[1000];