This library contains code that extends and simplifies different operations
for C++ language based programs
Revision | 5ef95c99ad7baab376ab7f544f7ef49bf15f2533 (tree) |
---|---|
Zeit | 2022-10-05 10:23:29 |
Autor | Sergey Gusarov <laborer2008@gmai...> |
Commiter | Sergey Gusarov |
Added ctools/test_attributes
@@ -1,3 +1,3 @@ | ||
1 | -92cb16566dd6cdc8e288d395149597e82c12b437 libctools | |
1 | +ceb9f3b36be6953c4a5f5f1b1da2b09edbd280bf libctools | |
2 | 2 | 0556a9e3eb8cef3262acbd7be988447b41b14215 pyrepo |
3 | 3 | 2fe3bd994b3189899d93f1d5a881e725e046fdc2 tests/googletest |
@@ -0,0 +1,29 @@ | ||
1 | +/* | |
2 | + * @author Sergey Gusarov <laborer2008 (at) gmail.com> | |
3 | + * @section LICENSE | |
4 | + * This Source Code Form is subject to the terms of the Mozilla Public | |
5 | + * License, v. 2.0. If a copy of the MPL was not distributed with this | |
6 | + * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
7 | + * | |
8 | + * @section DESCRIPTION | |
9 | + */ | |
10 | + | |
11 | +#include "tests/gtest_headers.hpp" | |
12 | + | |
13 | +#include <ctools/predef/attributes.h> | |
14 | + | |
15 | + | |
16 | +#define TEST_CASE_NAME attributes | |
17 | + | |
18 | +TEST(TEST_CASE_NAME, compile) | |
19 | +{ | |
20 | +#if defined (CT_COMPL_BCC) | |
21 | + #define ALIGN_VALUE 512 | |
22 | + | |
23 | + CT_ALIGNED(ALIGN_VALUE) int a; | |
24 | + | |
25 | + TEST_ASSERT_TRUE(((uint64_t)(&a)) % ALIGN_VALUE == 0); | |
26 | + | |
27 | + #undef ALIGN_VALUE | |
28 | +#endif | |
29 | +} |