wip: test if valgrind fails
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
light7734 2025-07-17 11:40:17 +03:30
parent 8ca1ed2bd6
commit c070b7abff
Signed by: light7734
GPG key ID: 8C30176798F1A6BA

View file

@ -12,6 +12,8 @@ using lt::test::expect_le;
// <1us error margin is tested manually in release builds and it works fine. // <1us error margin is tested manually in release builds and it works fine.
constexpr auto max_error_margin = std::chrono::milliseconds { 1 }; constexpr auto max_error_margin = std::chrono::milliseconds { 1 };
volatile int *volatile global_leak {};
lt::test::Suite raii = [] { lt::test::Suite raii = [] {
using std::chrono::microseconds; using std::chrono::microseconds;
@ -29,8 +31,8 @@ lt::test::Suite raii = [] {
} }
}; };
int *leak = new int(42); // Allocated memory, never freed global_leak = new int(42); // Allocated memory, never freed
std::cout << "Hello, Valgrind!" << *leak << std::endl; std::cout << "Hello, Valgrind!" << *global_leak << std::endl;
}; };
lt::test::Suite reset_and_elapsed_time = [] { lt::test::Suite reset_and_elapsed_time = [] {