defaultcpp/tests/sampletest.cpp

30 lines
331 B
C++
Raw Normal View History

2021-11-12 16:36:49 +01:00
#include "test.h"
#include <stdexcept>
// tests are executed top to bottom
// never fail
2021-11-12 16:36:49 +01:00
TEST(ABC) {
CMPASSERT(1, true);
} TESTEND
// always fail
2021-11-12 16:36:49 +01:00
TEST(CDE) {
CMPASSERT(0, true);
} TESTEND
// always skip
TEST(FGH) {
SKIPTEST;
} TESTEND
// always throw
TEST(IJK) {
throw std::runtime_error("test exception");
} TESTEND