From 73ae58e522d25c8e9f624bf45ddbb74a5fdbec6f Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Sat, 13 Aug 2022 17:04:55 +0200 Subject: [PATCH] test/assert: Add line number to assertion failed message --- src/test/assert.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/assert.hpp b/src/test/assert.hpp index e85125b..a27c6ca 100644 --- a/src/test/assert.hpp +++ b/src/test/assert.hpp @@ -15,4 +15,4 @@ #include -#define ASSERT(truth) if ((truth)); else { std::cout << "Assertion failed: " << #truth << std::endl; return 1; } +#define ASSERT(truth) if ((truth)); else { std::cout << "On line " << __LINE__ << ": Assertion failed: " << #truth << std::endl; return 1; }