From a96e05c0279d2a305fd3858f24c0fe3f26ac9b61 Mon Sep 17 00:00:00 2001 From: Luwei Zhou Date: Wed, 2 Jun 2021 16:27:13 +0800 Subject: [PATCH] Add Swish unsupported parameter data type test cases. Signed-off-by: Luwei Zhou --- ngraph/test/type_prop/swish.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ngraph/test/type_prop/swish.cpp b/ngraph/test/type_prop/swish.cpp index bdb45ed1292a36..324d8f46a59cc7 100644 --- a/ngraph/test/type_prop/swish.cpp +++ b/ngraph/test/type_prop/swish.cpp @@ -81,3 +81,17 @@ TEST(type_prop, swish_2_inputs) ASSERT_TRUE(swish_func->get_output_partial_shape(0).same_scheme(data->get_output_shape(0))); ASSERT_TRUE(swish_func->get_output_partial_shape(0).rank().is_static()); } + +TEST(type_prop, swish_incompatible_type_boolean) +{ + auto data = make_shared(element::boolean, Shape{1, 3, 6}); + auto beta = make_shared(element::f32, Shape{}); + ASSERT_THROW(make_shared(data, beta);, ngraph::NodeValidationFailure); +} + +TEST(type_prop, swish_incompatible_types_u32) +{ + auto data = make_shared(element::f32, Shape{1, 3, 6}); + auto beta = make_shared(element::u32, Shape{}); + ASSERT_THROW(make_shared(data, beta);, ngraph::NodeValidationFailure); +}