From aaddd1cd8095abd85f14f1a351aba42e0da554ef Mon Sep 17 00:00:00 2001 From: John Van Enk Date: Wed, 3 Oct 2012 12:44:02 -0400 Subject: [PATCH] Add test that will break if the _Unity struct ever changes. --- test/testunity.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/testunity.c b/test/testunity.c index 8c42534..568234f 100644 --- a/test/testunity.c +++ b/test/testunity.c @@ -50,6 +50,14 @@ void tearDown(void) } } +void testBreadCrumbs(void) +{ + /* This test ensures that sizeof(struct _Unity) doesn't change. If this + * test breaks, go look at the initialization of the Unity global variable + * in unity.c and make sure we're filling in the proper fields. */ + TEST_ASSERT_EQUAL(104, sizeof(Unity)); +} + void testTrue(void) { TEST_ASSERT(1); @@ -2021,4 +2029,4 @@ void testNotEqualDoubleArraysNegative3(void) VERIFY_FAILS_END #endif } - \ No newline at end of file +