diff --git a/src/multi_array_operation.cc b/src/multi_array_operation.cc index 0e30e72..d8f8525 100644 --- a/src/multi_array_operation.cc +++ b/src/multi_array_operation.cc @@ -54,6 +54,7 @@ namespace MultiArrayTools template std::shared_ptr > makeBlock(const std::vector& vec, size_t stepSize, size_t blockSize) { + VCHECK(stepSize); if(stepSize == 0){ return std::make_shared >(vec, 0, blockSize); } @@ -68,6 +69,7 @@ namespace MultiArrayTools template std::shared_ptr > makeBlock(std::vector& vec, size_t stepSize, size_t blockSize) { + VCHECK(stepSize); if(stepSize == 0){ return std::make_shared >(vec, 0, blockSize); } diff --git a/src/op_unit_test.cc b/src/op_unit_test.cc index 2f2e797..d743049 100644 --- a/src/op_unit_test.cc +++ b/src/op_unit_test.cc @@ -110,7 +110,7 @@ namespace { EXPECT_EQ( fabs( res.at('f') - (0.373+8.215) ) < 0.0001, true ); EXPECT_EQ( fabs( res.at('g') - (7.192+5.063) ) < 0.0001, true ); } - /* + TEST_F(OpTest_MDim, ExecOp1) { MultiArray res(sr2ptr,sr4ptr); @@ -132,7 +132,7 @@ namespace { EXPECT_EQ( fabs( res.at(mkt('3','B')) - (0.373 * 4.790) ) < 0.0001, true ); } - + /* TEST_F(OpTest_MDim, ExecOp2) { MultiArray res(mr1ptr,sr4ptr);