From 1fb10980808d66dfa6dec4ac87857d5c13bf7298 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Thu, 22 Aug 2024 11:45:47 +0200 Subject: Removing storage as a parameter --- modules/codec/tests/codec.cpp | 58 +++++++++++++++++++++---------------------- modules/codec/tests/csv.cpp | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) (limited to 'modules/codec/tests') diff --git a/modules/codec/tests/codec.cpp b/modules/codec/tests/codec.cpp index 1bec214..7ad1c89 100644 --- a/modules/codec/tests/codec.cpp +++ b/modules/codec/tests/codec.cpp @@ -54,7 +54,7 @@ using TestInterface = Interface< SAW_TEST("One Dimensional Array") { using namespace saw; - data arr{500u}; + data arr{500u}; int bar = 0; @@ -73,7 +73,7 @@ SAW_TEST("One Dimensional Array") { SAW_TEST("One dim Array Default init"){ using namespace saw; - data arr; + data arr; SAW_EXPECT(arr.get_dim_size(0) == 0, "Dim should be size 0"); SAW_EXPECT(arr.size() == 0, "Total size should also be zero"); @@ -82,7 +82,7 @@ SAW_TEST("One dim Array Default init"){ SAW_TEST("One dimensional Array Add"){ using namespace saw; - data arr{5u}; + data arr{5u}; int bar = 0; @@ -99,7 +99,7 @@ SAW_TEST("One dimensional Array Add"){ SAW_TEST("Two Dimensional Array") { using namespace saw; - data arr{10,30u}; + data arr{10,30u}; int expected_sum = (300 * 301) / 2; @@ -123,7 +123,7 @@ SAW_TEST("Two Dimensional Array") { SAW_TEST("Three Dimensional Array") { using namespace saw; - data arr{10,10u,3}; + data arr{10,10u,3}; int expected_sum = (300 * 301) / 2; int bar = 0; @@ -149,7 +149,7 @@ SAW_TEST("Three Dimensional Array") { SAW_TEST("KelSimple UInt16 write"){ using namespace saw; - data native; + data native; data simple; codec codec; @@ -172,7 +172,7 @@ SAW_TEST("KelSimple UInt16 write"){ SAW_TEST("KelSimple UInt32 write"){ using namespace saw; - data native; + data native; data simple; codec codec; @@ -195,7 +195,7 @@ SAW_TEST("KelSimple UInt32 write"){ SAW_TEST("KelSimple Array write and read back"){ using namespace saw; - data native{2,3}; + data native{2,3}; data simple; codec codec; @@ -228,7 +228,7 @@ SAW_TEST("KelSimple Array write and read back"){ SAW_TEST("KelSimple Struct write and read back"){ using namespace saw; - data native; + data native; data simple; auto& tda = native.template get<"two_dim_array">(); @@ -259,7 +259,7 @@ SAW_TEST("KelSimple Struct write and read back"){ SAW_TEST("Native Union same type compilation"){ using namespace saw; - data native; + data native; native.template init<"two">().set(50u); @@ -272,10 +272,10 @@ SAW_TEST("Native Union same type compilation"){ SAW_TEST("KelSimple Union write and read back"){ using namespace saw; - data native; + data native; data simple; - native.template set<"number">(data{}); + native.template set<"number">(data{}); native.template get<"number">().set(410); codec codec; @@ -296,7 +296,7 @@ SAW_TEST("KelSimple Union write and read back"){ SAW_TEST("KelSimple Tuple write and read back"){ using namespace saw; - data native; + data native; data simple; auto& tda = native.template get<0>(); @@ -327,7 +327,7 @@ SAW_TEST("KelSimple Tuple write and read back"){ SAW_TEST("KelSimple String write and read back"){ using namespace saw; - data native; + data native; data simple; std::string str = "FooBananaJoe"; @@ -352,14 +352,14 @@ SAW_TEST("Function basics"){ using namespace saw; { - data native; + data native; native.get<0>().set(5); native.get<1>().set(40); - auto func_add = function_factory::create( - [](data req){ - data resp; + auto func_add = function_factory::create( + [](data req){ + data resp; resp.set(req.get<0>().get() + req.get<1>().get()); @@ -378,26 +378,26 @@ SAW_TEST("Function basics"){ SAW_TEST("Interface basics"){ using namespace saw; - data native; + data native; auto func_add = - [](data& req){ - data resp; + [](data& req){ + data resp; resp.set(req.get<0>().get() + req.get<1>().get()); return resp; }; auto func_sub = - [](data& req){ - data resp; + [](data& req){ + data resp; resp.set(req.get<0>().get() - req.get<1>().get()); return resp; }; - auto func_multiply = [](data& req){ - data resp; + auto func_multiply = [](data& req){ + data resp; resp.set(req.get<0>().get() * req.get<1>().get()); @@ -409,10 +409,10 @@ SAW_TEST("Interface basics"){ return void_t{}; }; - auto iface = interface_factory::create(std::move(func_add), std::move(func_sub), std::move(func_multiply), std::move(func_void)); + auto iface = interface_factory::create(std::move(func_add), std::move(func_sub), std::move(func_multiply), std::move(func_void)); { - data native; + data native; native.get<0>().set(5); native.get<1>().set(40); @@ -423,7 +423,7 @@ SAW_TEST("Interface basics"){ SAW_EXPECT(val.get() == 45, "Sum is incorrect"); } { - data native; + data native; native.get<0>().set(5); native.get<1>().set(40); @@ -434,7 +434,7 @@ SAW_TEST("Interface basics"){ SAW_EXPECT(val.get() == -35, "Sum is incorrect"); } { - data native; + data native; native.get<0>().set(5); native.get<1>().set(40); diff --git a/modules/codec/tests/csv.cpp b/modules/codec/tests/csv.cpp index 638b864..ac394ce 100644 --- a/modules/codec/tests/csv.cpp +++ b/modules/codec/tests/csv.cpp @@ -22,7 +22,7 @@ SAW_TEST("Codec Csv Encode Basic"){ using namespace saw; size_t n_size = 3; - data native_data{n_size}; + data native_data{n_size}; { auto& row = native_data.at(0); row.template get<"string">().set("foo"); -- cgit v1.2.3