diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-09-17 18:07:04 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-09-17 18:07:04 +0200 |
commit | 90acc8c3d29a7f3309aef212ae1548494aec494a (patch) | |
tree | f51db26b7cf7487208e374a6cd7d7b6cd542d5f7 /modules/codec/tests/data_raw.cpp | |
parent | c64b9df7aceb41f5c61f46f8205a3c50ef3aef4c (diff) |
wip
Diffstat (limited to 'modules/codec/tests/data_raw.cpp')
-rw-r--r-- | modules/codec/tests/data_raw.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/modules/codec/tests/data_raw.cpp b/modules/codec/tests/data_raw.cpp index 11e2c5e..26c2721 100644 --- a/modules/codec/tests/data_raw.cpp +++ b/modules/codec/tests/data_raw.cpp @@ -14,23 +14,29 @@ SAW_TEST("Data NativeRaw/Array of Primitives"){ using namespace saw; data<sch::Int32Array,encode::NativeRaw> prim{4u}; - prim.at(1u).set(0); + prim.at(0u).set(0); - auto a = prim.at(1u); + auto a = prim.at(0u); + auto b = prim.at(1u); + auto c = prim.at(2u); + auto d = prim.at(3u); a.set(5); + b.set(6); - auto b = prim.at(1u); // Check if it's a reference being manipulated SAW_EXPECT(a.get() == 5, "'a' has unexpected value."); - SAW_EXPECT(b.get() == 5, "'b' has unexpected value."); + SAW_EXPECT(b.get() == 6, "'b' has unexpected value."); - auto c = prim.at(1u); - c.set(10); + auto b1 = prim.at(1u); + b1.set(10); + c.set(-9); - SAW_EXPECT(a.get() == 10, "'a' has unexpected value."); + SAW_EXPECT(b1.get() == 10, "'b1' has unexpected value."); + SAW_EXPECT(a.get() == 5, "'a' has unexpected value."); SAW_EXPECT(b.get() == 10, "'b' has unexpected value."); - SAW_EXPECT(c.get() == 10, "'c' has unexpected value."); + SAW_EXPECT(c.get() == -9, "'c' has unexpected value."); + SAW_EXPECT(d.get() == 23, "'d' has unexpected value."); } } |