This commit is contained in:
Alejandro Saucedo
2021-02-08 07:18:32 +00:00
parent 815acfa1fe
commit d24dfb7590
4 changed files with 98 additions and 57 deletions

View File

@@ -114,7 +114,6 @@ TEST(TestOpTensorCreate, NoErrorIfTensorFreedBefore)
EXPECT_FALSE(tensorB->isInit());
}
TEST(TestOpTensorCreate, ExceptionOnZeroSizeTensor)
{
std::vector<float> testVecA;
@@ -123,11 +122,11 @@ TEST(TestOpTensorCreate, ExceptionOnZeroSizeTensor)
kp::Manager mgr;
try{
try {
mgr.evalOpDefault<kp::OpTensorCreate>({ tensorA });
} catch( const std::runtime_error& err ) {
// check exception
ASSERT_TRUE( std::string(err.what()).find("zero-sized") != std::string::npos );
} catch (const std::runtime_error& err) {
// check exception
ASSERT_TRUE(std::string(err.what()).find("zero-sized") !=
std::string::npos);
}
}