Skip to content
Snippets Groups Projects
Commit 7302dd25 authored by Maxence Naud's avatar Maxence Naud
Browse files

UPD: try test using 'Log::log()' instead of 'Tensor::print()' with Test_AddImpl.cpp

parent 4c4d7c11
No related branches found
No related tags found
2 merge requests!128Draft: fix failed onnx tests,!115Draft: Add management for aidge module dependencies
Pipeline #63575 waiting for manual action
......@@ -100,7 +100,7 @@ TEST_CASE("[cpu/operator] Add(forward)", "[Add][CPU]") {
}); //
std::shared_ptr<Tensor> input_2 = std::make_shared<Tensor>(Array1D<int,2> {{100,200}});
std::shared_ptr<Tensor> expectedOutput = std::make_shared<Tensor>(Array4D<int,3,3,3,2> {
Tensor expectedOutput = Array4D<int,3,3,3,2> {
{ //
{ //
{{ 120, 222},{ 124, 226},{ 128, 230}}, //
......@@ -118,7 +118,7 @@ TEST_CASE("[cpu/operator] Add(forward)", "[Add][CPU]") {
{{ 144, 246},{ 148, 250},{152, 254}} //
} //
} //
}); //
}; //
std::shared_ptr<Node> myAdd_0 = Add();
std::shared_ptr<Node> myAdd_1 = Add();
......@@ -135,8 +135,8 @@ TEST_CASE("[cpu/operator] Add(forward)", "[Add][CPU]") {
op_1->setBackend("cpu");
myAdd_0->forward();
myAdd_1->forward();
op_1->getOutput(0)->print();
expectedOutput->print();
REQUIRE(*op_1->getOutput(0) == *expectedOutput);
Log::info("Add_1 Tensor:\n{}", *(op_1->getOutput(0)));
Log::info("Expected Add_1 Tensor:\n{}", expectedOutput);
REQUIRE(*op_1->getOutput(0) == expectedOutput);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment