wip: test if valgrind fails
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
8ca1ed2bd6
commit
c070b7abff
1 changed files with 4 additions and 2 deletions
|
@ -12,6 +12,8 @@ using lt::test::expect_le;
|
|||
// <1us error margin is tested manually in release builds and it works fine.
|
||||
constexpr auto max_error_margin = std::chrono::milliseconds { 1 };
|
||||
|
||||
volatile int *volatile global_leak {};
|
||||
|
||||
lt::test::Suite raii = [] {
|
||||
using std::chrono::microseconds;
|
||||
|
||||
|
@ -29,8 +31,8 @@ lt::test::Suite raii = [] {
|
|||
}
|
||||
};
|
||||
|
||||
int *leak = new int(42); // Allocated memory, never freed
|
||||
std::cout << "Hello, Valgrind!" << *leak << std::endl;
|
||||
global_leak = new int(42); // Allocated memory, never freed
|
||||
std::cout << "Hello, Valgrind!" << *global_leak << std::endl;
|
||||
};
|
||||
|
||||
lt::test::Suite reset_and_elapsed_time = [] {
|
||||
|
|
Loading…
Add table
Reference in a new issue