feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security, data, app, realtime, supervisor, clients, CLI, example plus enterprise tenancy, audit, operability, governance, supplychain. Postgres via docker compose for tests.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
// Minimal test helper. Tests print FAIL lines per broken check and a PASS
|
||||
// line with counts, and return nonzero when any check fails.
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
struct TestCtx {
|
||||
int checks = 0;
|
||||
int failures = 0;
|
||||
};
|
||||
|
||||
#define CHECK(ctx, cond) \
|
||||
do { \
|
||||
++(ctx).checks; \
|
||||
if (!(cond)) { \
|
||||
++(ctx).failures; \
|
||||
std::printf("FAIL %s:%d: %s\n", __FILE__, __LINE__, #cond); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
inline int test_summary(TestCtx& ctx, const char* name) {
|
||||
if (ctx.failures == 0) {
|
||||
std::printf("PASS %s (%d checks)\n", name, ctx.checks);
|
||||
return 0;
|
||||
}
|
||||
std::printf("FAIL %s (%d of %d checks failed)\n", name, ctx.failures, ctx.checks);
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user