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

upd TensorImpl test according to new copy assignment operator for Tensor

parent a219640d
No related branches found
No related tags found
1 merge request!22Fix tensor backend with copy
......@@ -21,9 +21,7 @@ using namespace Aidge;
TEST_CASE("Tensor creation opencv", "[Tensor][OpenCV]") {
SECTION("from const array") {
Tensor x;
x.setDataType(Aidge::DataType::Int32);
x.setBackend("opencv");
x = Array3D<int,2,2,2>{
x = Array3D<cpptype_t<DataType::Int32>,2,2,2>{
{
{
{1, 2},
......@@ -34,11 +32,10 @@ TEST_CASE("Tensor creation opencv", "[Tensor][OpenCV]") {
{7, 8}
}
}};
x.setBackend("opencv");
Tensor xCopy;
xCopy.setDataType(Aidge::DataType::Int32);
xCopy.setBackend("opencv");
xCopy = Array3D<int,2,2,2>{
xCopy = Array3D<cpptype_t<DataType::Int32>,2,2,2>{
{
{
{1, 2},
......@@ -49,10 +46,9 @@ TEST_CASE("Tensor creation opencv", "[Tensor][OpenCV]") {
{7, 8}
}
}};
xCopy.setBackend("opencv");
Tensor xFloat;
xFloat.setBackend("opencv");
xFloat = Array3D<float,2,2,2>{
Tensor xFloat{Array3D<cpptype_t<DataType::Float32>,2,2,2>{
{
{
{1., 2.},
......@@ -62,7 +58,8 @@ TEST_CASE("Tensor creation opencv", "[Tensor][OpenCV]") {
{5., 6.},
{7., 8.}
}
}};
}}};
xFloat.setBackend("opencv");
SECTION("Tensor features") {
REQUIRE(x.nbDims() == 3);
......
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