• R/O
  • SSH

libcpptools: Commit

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


Commit MetaInfo

Revision5ef95c99ad7baab376ab7f544f7ef49bf15f2533 (tree)
Zeit2022-10-05 10:23:29
AutorSergey Gusarov <laborer2008@gmai...>
CommiterSergey Gusarov

Log Message

Added ctools/test_attributes

Ändern Zusammenfassung

Diff

diff -r 0e62181a2460 -r 5ef95c99ad7b .hgsubstate
--- a/.hgsubstate Mon Sep 12 04:32:40 2022 +0300
+++ b/.hgsubstate Wed Oct 05 04:23:29 2022 +0300
@@ -1,3 +1,3 @@
1-92cb16566dd6cdc8e288d395149597e82c12b437 libctools
1+ceb9f3b36be6953c4a5f5f1b1da2b09edbd280bf libctools
22 0556a9e3eb8cef3262acbd7be988447b41b14215 pyrepo
33 2fe3bd994b3189899d93f1d5a881e725e046fdc2 tests/googletest
diff -r 0e62181a2460 -r 5ef95c99ad7b tests/src/libctools/predef/test_attributes.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/src/libctools/predef/test_attributes.cpp Wed Oct 05 04:23:29 2022 +0300
@@ -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+}
Show on old repository browser