From ae0c539bfc2ca87cf66ce8aea0b3a7d86b691061 Mon Sep 17 00:00:00 2001 From: alexander-g <3867427+alexander-g@users.noreply.github.com> Date: Sun, 31 Jan 2021 07:21:23 +0100 Subject: [PATCH] weaker test case and constructor comment --- src/include/kompute/Tensor.hpp | 2 +- test/TestOpTensorCreate.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/kompute/Tensor.hpp b/src/include/kompute/Tensor.hpp index 0a22eaf..d7b7e8f 100644 --- a/src/include/kompute/Tensor.hpp +++ b/src/include/kompute/Tensor.hpp @@ -39,7 +39,7 @@ class Tensor * Default constructor with data provided which would be used to create the * respective vulkan buffer and memory. * - * @param data Vector of data that will be used by the tensor + * @param data Non-zero-sized vector of data that will be used by the tensor * @param tensorType Type for the tensor which is of type TensorTypes */ Tensor(const std::vector& data, diff --git a/test/TestOpTensorCreate.cpp b/test/TestOpTensorCreate.cpp index e25c135..1281e1b 100644 --- a/test/TestOpTensorCreate.cpp +++ b/test/TestOpTensorCreate.cpp @@ -127,7 +127,7 @@ TEST(TestOpTensorCreate, ExceptionOnZeroSizeTensor) mgr.evalOpDefault({ tensorA }); } catch( const std::runtime_error& err ) { // check exception - ASSERT_STREQ("Kompute Tensor attempted to create a zero-sized buffer", err.what() ); + ASSERT_TRUE( std::string(err.what()).find("zero-sized") != std::string::npos ); } }