tests add to namespace sls (#464)

This commit is contained in:
Dhanya Thattil
2022-05-20 15:41:37 +02:00
committed by GitHub
parent c7ba79644a
commit f5745fcf18
44 changed files with 350 additions and 228 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