From c05d04683a74d476909cc1ebd206edeefb650a88 Mon Sep 17 00:00:00 2001 From: heck Date: Thu, 8 Jul 2021 02:49:49 +0200 Subject: [PATCH] Test: PityTest - test_assert.cc updated --- test/pitytest11/test/test_assert.cc | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/test/pitytest11/test/test_assert.cc b/test/pitytest11/test/test_assert.cc index b9f9c52..e5d7706 100644 --- a/test/pitytest11/test/test_assert.cc +++ b/test/pitytest11/test/test_assert.cc @@ -3,9 +3,6 @@ #include using namespace pEp::PityTest11; - -using TestUnit = PityUnit<>; - void not_throwing() {} void throwing() @@ -15,18 +12,18 @@ void throwing() int main(int argc, char* argv[]) { - TestUnit asserts {"test_asserts"}; - asserts.add("nfdsg", []() { - PITYASSERT(true, "thats wrong"); - try { - PITYASSERT(false, "thats correct"); - throw std::runtime_error("PITYASSERT(false) does not throw"); - } catch (const PityAssertException& pae) { - } - }) + PITYASSERT(true, "thats wrong"); + try { + PITYASSERT(false, "thats correct"); + throw std::runtime_error("PITYASSERT(false) does not throw"); + } catch (const PityAssertException& pae) { + } + + PITYASSERT(true, "thats wrong"); PITYASSERT_THROWS(throwing(), "is actually throwing "); + try { PITYASSERT_THROWS(not_throwing(), "is actually not throwing"); throw std::runtime_error("PITYASSERT(false) does not throw");