• R/O
  • SSH

libctools: Commit

This library contains code that extends and simplifies different operations
for C language based programs.


Commit MetaInfo

Revisionceb9f3b36be6953c4a5f5f1b1da2b09edbd280bf (tree)
Zeit2022-10-05 09:58:53
AutorSergey Gusarov <laborer2008@gmai...>
CommiterSergey Gusarov

Log Message

test_attributes: Test CT_ALIGNED() only for limited platforms

Ändern Zusammenfassung

Diff

diff -r 9daeb32610b8 -r ceb9f3b36be6 tests/src/predef/test_attributes.c
--- a/tests/src/predef/test_attributes.c Wed Oct 05 03:51:36 2022 +0300
+++ b/tests/src/predef/test_attributes.c Wed Oct 05 03:58:53 2022 +0300
@@ -92,13 +92,19 @@
9292 deprecatedFunction();
9393 }
9494
95-#define ALIGN_VALUE 512
96-
9795 void testAligned(void)
9896 {
97+#if defined (CT_COMPL_GCC_EMULATION) || defined (CT_COMPL_MSVC) || defined (CT_LANG_C11) || defined (CT_LANG_CXX11)\
98+ || (defined (CT_COMPL_BCC) && defined (__cplusplus))
99+
100+ #define ALIGN_VALUE 512
101+
99102 CT_ALIGNED(ALIGN_VALUE) int a;
100103
101104 TEST_ASSERT_TRUE(((uint64_t)(&a)) % ALIGN_VALUE == 0);
105+
106+ #undef ALIGN_VALUE
107+#endif
102108 }
103109
104110 void testFunction(void)
Show on old repository browser