Add ASSERT_ACCEPTS and ASSERT_REJECTS testing macros

This commit is contained in:
2024-11-02 16:38:32 +00:00
parent c6f0cf6381
commit 5dbcaaaf40
2 changed files with 63 additions and 62 deletions

View File

@@ -34,6 +34,9 @@
#define ASSERT_NOT_NULL(p) ASSERT_FALSE(NULL == (p))
#define ASSERT_MEM_EQ(p, q, n) ASSERT_FALSE(memcmp(p, q, n) != 0)
#define ASSERT_ACCEPTS(dfa, s) ASSERT_TRUE(fsa_accepts(dfa, s, strlen(s)))
#define ASSERT_REJECTS(dfa, s) ASSERT_FALSE(fsa_accepts(dfa, s, strlen(s)))
extern int fail_count;
#endif