diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-06-17 14:41:12 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-06-17 14:41:12 +0200 |
commit | 4a85d662012360fecffc9b0e58a582204f631957 (patch) | |
tree | 5e87d8d385742824d9ffe1ef76d01e3257a0e80e /modules/codec/tests | |
parent | 76409ba8c1a57c9be68baf2d2c480673eb186eda (diff) |
Rewriting parts to avoid infinite recursion in flat index call
Diffstat (limited to 'modules/codec/tests')
-rw-r--r-- | modules/codec/tests/SConscript | 2 | ||||
-rw-r--r-- | modules/codec/tests/codec.cpp | 3 | ||||
-rw-r--r-- | modules/codec/tests/data_raw.cpp | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/modules/codec/tests/SConscript b/modules/codec/tests/SConscript index f8ffc92..ebaf45f 100644 --- a/modules/codec/tests/SConscript +++ b/modules/codec/tests/SConscript @@ -13,6 +13,8 @@ dir_path = Dir('.').abspath test_cases_env = env.Clone(); test_cases_env.Append(LIBS=['forstio-test']); +# test_cases_env.Append(CCFLAGS=['-fsanitize=address','-g']); +# test_cases_env.Append(LINKFLAGS=['-fsanitize=address']); test_cases_env.sources = sorted(glob.glob(dir_path + "/*.cpp")) test_cases_env.headers = sorted(glob.glob(dir_path + "/*.hpp")) diff --git a/modules/codec/tests/codec.cpp b/modules/codec/tests/codec.cpp index ef45b4e..27bc454 100644 --- a/modules/codec/tests/codec.cpp +++ b/modules/codec/tests/codec.cpp @@ -53,11 +53,14 @@ using TestInterface = Interface< } SAW_TEST("One Dimensional Array") { using namespace saw; + std::cout<<"foo "<<std::endl; data<schema::OneDimArray, encode::Native> arr{{{500u}}}; + std::cout<<"foo2 "<<std::endl; int bar = 0; + std::cout<<"arr_size "<<arr.size().get()<<std::endl; for(data<schema::UInt64, encode::Native> i = 0; i < arr.size(); ++i){ arr.at(i).set(bar++); } diff --git a/modules/codec/tests/data_raw.cpp b/modules/codec/tests/data_raw.cpp index 26c2721..930758d 100644 --- a/modules/codec/tests/data_raw.cpp +++ b/modules/codec/tests/data_raw.cpp @@ -23,6 +23,7 @@ SAW_TEST("Data NativeRaw/Array of Primitives"){ a.set(5); b.set(6); + d.set(23); // Check if it's a reference being manipulated SAW_EXPECT(a.get() == 5, "'a' has unexpected value."); |