From 107c517b22e88d760c375a4b9da6dffd6da26d85 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 7 Feb 2026 09:25:17 +0900 Subject: refactor: add ASSERT_EQ_STR() to tests/helpers.h --- tests/helpers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/helpers.h') diff --git a/tests/helpers.h b/tests/helpers.h index 39274e4..c9d9819 100644 --- a/tests/helpers.h +++ b/tests/helpers.h @@ -6,6 +6,7 @@ struct FILE; typedef struct FILE FILE; int fprintf(FILE*, const char*, ...); extern FILE* stderr; +int strcmp(const char*, const char*); #define ASSERT(a, file, line) \ do { \ @@ -16,5 +17,6 @@ extern FILE* stderr; } while (0) #define ASSERT_EQ(a, b) ASSERT((a) == (b), __FILE__, __LINE__) +#define ASSERT_EQ_STR(a, b) ASSERT(strcmp((a), (b)) == 0, __FILE__, __LINE__) #endif -- cgit v1.3-1-g0d28