From cf534d762754860ed5b714974f99acd282d48b3b Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Wed, 8 Apr 2026 13:14:27 +0200 Subject: Restructure into src/{std,json}/ Co-Authored-By: Claude Sonnet 4.6 --- src/std/assert.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/std/assert.h (limited to 'src/std/assert.h') diff --git a/src/std/assert.h b/src/std/assert.h new file mode 100644 index 0000000..aa62bd1 --- /dev/null +++ b/src/std/assert.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +#define assert(condition, ...) \ + do { \ + if (!(condition)) { \ + fprintf(stderr, "Assertion failed: %s:%d in %s(): ", __FILE__, \ + __LINE__, __func__); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n"); \ + abort(); \ + } \ + } while (0) -- cgit v1.3