diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-21 13:31:32 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-21 13:32:12 +0100 |
commit | 8b59916a763321a927b1c9103728cac03af82d36 (patch) | |
tree | e6a5c13ae305ccec154e5b8281f9671ef7dfbfa1 /testsuites | |
parent | bsps/arm: Add cache size support for CP15 (diff) | |
download | rtems-8b59916a763321a927b1c9103728cac03af82d36.tar.bz2 |
spcxx01: Add test case
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/spcxx01/init.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuites/sptests/spcxx01/init.cc b/testsuites/sptests/spcxx01/init.cc index 986731634b..7962810da0 100644 --- a/testsuites/sptests/spcxx01/init.cc +++ b/testsuites/sptests/spcxx01/init.cc @@ -37,6 +37,10 @@ const char rtems_test_name[] = "SPCXX 1"; +struct alignas(256) S { + int i; +}; + extern "C" void Init(rtems_task_argument arg) { TEST_BEGIN(); @@ -49,6 +53,12 @@ extern "C" void Init(rtems_task_argument arg) rtems_test_assert(reinterpret_cast<uintptr_t>(i) % 256 == 0); ::delete(i); + S *s = new S; + RTEMS_OBFUSCATE_VARIABLE(s); + rtems_test_assert(s != nullptr); + rtems_test_assert(reinterpret_cast<uintptr_t>(s) % 256 == 0); + delete s; + TEST_END(); exit(0); } |