Started to convert from catch2 to fuc2.

This commit is contained in:
Zed A. Shaw 2026-06-16 04:38:38 -04:00
parent 4deda37665
commit b8b42d5681
10 changed files with 615 additions and 493 deletions

View file

@ -1,18 +1,28 @@
#include <catch2/catch_test_macros.hpp>
#include <fuc2/testing.hpp>
#include "dbc.hpp"
using namespace dbc;
TEST_CASE("basic feature tests", "[dbc]") {
log("Logging a message.");
namespace dbc_tests {
void test_basic_dbc_features() {
log("Logging a message.");
pre("confirm positive cases work", 1 == 1);
pre("confirm positive cases work", 1 == 1);
pre("confirm positive lambda", [&]{ return 1 == 1;});
pre("confirm positive lambda", [&]{ return 1 == 1;});
post("confirm positive post", 1 == 1);
post("confirm positive post", 1 == 1);
post("confirm postitive post with lamdba", [&]{ return 1 == 1;});
post("confirm postitive post with lamdba", [&]{ return 1 == 1;});
check(1 == 1, "one equals 1");
}
fuc2::Set TESTS{
.name="dbc",
.tests={
TEST(test_basic_dbc_features),
}
};
check(1 == 1, "one equals 1");
}