tests add to namespace sls (#466)

* tests add to namespace sls

* fixed for tests

* finish up namespace sls for tests
This commit is contained in:
Dhanya Thattil
2022-05-23 16:17:32 +02:00
committed by GitHub
parent 8656eeec25
commit d61741c28b
44 changed files with 360 additions and 236 deletions

View File

@ -7,14 +7,14 @@
#include <iostream>
namespace sls {
struct Data {
int x;
double y;
char mess[50];
};
using namespace sls;
constexpr int shm_id = 10;
TEST_CASE("Create SharedMemory read and write", "[detector]") {
@ -26,7 +26,7 @@ TEST_CASE("Create SharedMemory read and write", "[detector]") {
shm()->x = 3;
shm()->y = 5.7;
sls::strcpy_safe(shm()->mess, "Some string");
strcpy_safe(shm()->mess, "Some string");
CHECK(shm()->x == 3);
CHECK(shm()->y == 5.7);
@ -168,8 +168,6 @@ TEST_CASE("map int64 to int32 throws"){
REQUIRE_THROWS(shm2.openSharedMemory(true));
shm.removeSharedMemory();
}
}
} // namespace sls