From a17e1bf66967369c29af4b629241f6a17a624626 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 28 Feb 2024 18:27:46 +0100 Subject: Added a test for the default array case --- modules/codec/tests/codec.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/codec/tests/codec.cpp b/modules/codec/tests/codec.cpp index 05899cc..7113d45 100644 --- a/modules/codec/tests/codec.cpp +++ b/modules/codec/tests/codec.cpp @@ -66,6 +66,15 @@ SAW_TEST("One Dimensional Array") { SAW_EXPECT(sum == 124750, std::to_string(sum) + " is not 124750. Expected that data stays correct"); } +SAW_TEST("One dim Array Default init"){ + using namespace saw; + + 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"); +} + SAW_TEST("One dimensional Array Add"){ using namespace saw; -- cgit v1.2.3