diff --git a/src/UnitTests/Containers/VectorTest-1.h b/src/UnitTests/Containers/VectorTest-1.h index 3b01d60ec01f76f61cd648264e8440852df61741..e12ed8ad6dcc00bb3d69753d9ba624f6d25a84d5 100644 --- a/src/UnitTests/Containers/VectorTest-1.h +++ b/src/UnitTests/Containers/VectorTest-1.h @@ -174,11 +174,14 @@ TYPED_TEST( VectorTest, addVector ) y.setSize( size ); ViewType x_view( x ), y_view( y ); - VectorType expected1( size ), expected2( size ); + typename VectorType::HostType host_expected1( size ), host_expected2( size ); for( int i = 0; i < size; i++ ) { - expected1.setElement( i, 2.0 + 3.0 * i ); - expected2.setElement( i, 1.0 + 3.0 * i ); + host_expected1.setElement( i, 2.0 + 3.0 * i ); + host_expected2.setElement( i, 1.0 + 3.0 * i ); } + VectorType expected1, expected2; + expected1 = host_expected1; + expected2 = host_expected2; setConstantSequence( x, 1 ); setLinearSequence( y ); @@ -222,11 +225,14 @@ TYPED_TEST( VectorTest, addVectors ) z.setSize( size ); ViewType x_view( x ), y_view( y ), z_view( z ); - VectorType expected1( size ), expected2( size ); + typename VectorType::HostType host_expected1( size ), host_expected2( size ); for( int i = 0; i < size; i++ ) { - expected1.setElement( i, 1.0 + 3.0 * i + 2.0 ); - expected2.setElement( i, 2.0 + 3.0 * i + 2.0 ); + host_expected1.setElement( i, 1.0 + 3.0 * i + 2.0 ); + host_expected2.setElement( i, 2.0 + 3.0 * i + 2.0 ); } + VectorType expected1, expected2; + expected1 = host_expected1; + expected2 = host_expected2; setConstantSequence( x, 1 ); setLinearSequence( y );