defaultcpp/tests/sampletest.cpp

30 lines
331 B
C++

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