summaryrefslogtreecommitdiff
path: root/modules/codec/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/codec/tests')
-rw-r--r--modules/codec/tests/math.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/codec/tests/math.cpp b/modules/codec/tests/math.cpp
index 8b3b6f9..ad2d9a6 100644
--- a/modules/codec/tests/math.cpp
+++ b/modules/codec/tests/math.cpp
@@ -46,5 +46,13 @@ SAW_TEST("Math/Tensor"){
SAW_EXPECT(c.at({{1u,0u}}).get() == 7.0, std::string{"Unexpected value at (1,0): "} + std::to_string(c.at({{1u,0u}}).get()));
SAW_EXPECT(c.at({{1u,1u}}).get() == 9.0, std::string{"Unexpected value at (1,1): "} + std::to_string(c.at({{1u,1u}}).get()));
}
+
+ auto d = b - a;
+ {
+ SAW_EXPECT(d.at({{0u,0u}}).get() == 1.0, std::string{"Unexpected value at (0,0): "} + std::to_string(d.at({{0u,0u}}).get()) );
+ SAW_EXPECT(d.at({{0u,1u}}).get() == 1.0, std::string{"Unexpected value at (0,1): "} + std::to_string(d.at({{0u,1u}}).get()));
+ SAW_EXPECT(d.at({{1u,0u}}).get() == 1.0, std::string{"Unexpected value at (1,0): "} + std::to_string(d.at({{1u,0u}}).get()));
+ SAW_EXPECT(d.at({{1u,1u}}).get() == 1.0, std::string{"Unexpected value at (1,1): "} + std::to_string(d.at({{1u,1u}}).get()));
+ }
}
}