diff --git a/ngraph/test/visitors/op/acosh.cpp b/ngraph/test/visitors/op/acosh.cpp index 413a68710ab..901e69812b8 100644 --- a/ngraph/test/visitors/op/acosh.cpp +++ b/ngraph/test/visitors/op/acosh.cpp @@ -3,7 +3,8 @@ // #include "unary_ops.hpp" -using Type = ::testing::Types>; + +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/asinh.cpp b/ngraph/test/visitors/op/asinh.cpp index 6e18ede91c8..d791ae636ea 100644 --- a/ngraph/test/visitors/op/asinh.cpp +++ b/ngraph/test/visitors/op/asinh.cpp @@ -3,7 +3,7 @@ // #include "unary_ops.hpp" -using Type = ::testing::Types>; +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/atan.cpp b/ngraph/test/visitors/op/atan.cpp index 72b5931c72b..ba65d4c2865 100644 --- a/ngraph/test/visitors/op/atan.cpp +++ b/ngraph/test/visitors/op/atan.cpp @@ -4,7 +4,7 @@ #include "unary_ops.hpp" -using Types = ::testing::Types>; +using Types = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/ceiling.cpp b/ngraph/test/visitors/op/ceiling.cpp index dc4f32d29b6..6097e44f50b 100644 --- a/ngraph/test/visitors/op/ceiling.cpp +++ b/ngraph/test/visitors/op/ceiling.cpp @@ -3,7 +3,8 @@ // #include "unary_ops.hpp" -using Type = ::testing::Types>; + +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/cos.cpp b/ngraph/test/visitors/op/cos.cpp index 6b48a4b8b0c..9da84fe529b 100644 --- a/ngraph/test/visitors/op/cos.cpp +++ b/ngraph/test/visitors/op/cos.cpp @@ -3,7 +3,8 @@ // #include "unary_ops.hpp" -using Type = ::testing::Types>; + +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/cosh.cpp b/ngraph/test/visitors/op/cosh.cpp index d44b7701eb3..308f9e85deb 100644 --- a/ngraph/test/visitors/op/cosh.cpp +++ b/ngraph/test/visitors/op/cosh.cpp @@ -3,7 +3,8 @@ // #include "unary_ops.hpp" -using Type = ::testing::Types>; + +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/erf.cpp b/ngraph/test/visitors/op/erf.cpp index e0aab057a85..0e14a14d3f3 100644 --- a/ngraph/test/visitors/op/erf.cpp +++ b/ngraph/test/visitors/op/erf.cpp @@ -4,7 +4,7 @@ #include "unary_ops.hpp" -using Type = ::testing::Types>; +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/floor.cpp b/ngraph/test/visitors/op/floor.cpp index 6393a8295f2..145c7d8804c 100644 --- a/ngraph/test/visitors/op/floor.cpp +++ b/ngraph/test/visitors/op/floor.cpp @@ -4,8 +4,8 @@ #include "unary_ops.hpp" -using Types = ::testing::Types, - UnaryOperatorType>; +using Types = ::testing::Types, + UnaryOperatorType>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/log.cpp b/ngraph/test/visitors/op/log.cpp index f81d40e7302..3ac1e04b46e 100644 --- a/ngraph/test/visitors/op/log.cpp +++ b/ngraph/test/visitors/op/log.cpp @@ -1,9 +1,11 @@ // Copyright (C) 2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // + #include "unary_ops.hpp" -using Types = ::testing::Types, - UnaryOperatorType>; + +using Types = ::testing::Types, + UnaryOperatorType>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/negative.cpp b/ngraph/test/visitors/op/negative.cpp index 4880c73c0af..c71cc64cb99 100644 --- a/ngraph/test/visitors/op/negative.cpp +++ b/ngraph/test/visitors/op/negative.cpp @@ -4,8 +4,8 @@ #include "unary_ops.hpp" -using Types = ::testing::Types, - UnaryOperatorType>; +using Types = ::testing::Types, + UnaryOperatorType>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/result.cpp b/ngraph/test/visitors/op/result.cpp index 8adbe76321b..49a02203778 100644 --- a/ngraph/test/visitors/op/result.cpp +++ b/ngraph/test/visitors/op/result.cpp @@ -4,8 +4,8 @@ #include "unary_ops.hpp" -using Types = ::testing::Types, - UnaryOperatorType>; +using Types = ::testing::Types, + UnaryOperatorType>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/sign.cpp b/ngraph/test/visitors/op/sign.cpp index 557b7dc1669..5ef604744ae 100644 --- a/ngraph/test/visitors/op/sign.cpp +++ b/ngraph/test/visitors/op/sign.cpp @@ -3,7 +3,8 @@ // #include "unary_ops.hpp" -using Type = ::testing::Types>; + +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/sinh.cpp b/ngraph/test/visitors/op/sinh.cpp index db35d185c4a..0f780a8f3c7 100644 --- a/ngraph/test/visitors/op/sinh.cpp +++ b/ngraph/test/visitors/op/sinh.cpp @@ -3,9 +3,10 @@ // #include "unary_ops.hpp" -using Type = ::testing::Types>; + +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, - UnaryOperatorVisitor, - Type, - UnaryOperatorTypeName); + UnaryOperatorVisitor, + Type, + UnaryOperatorTypeName); diff --git a/ngraph/test/visitors/op/softplus.cpp b/ngraph/test/visitors/op/softplus.cpp index 6f0134b5a82..e27c13ecd22 100644 --- a/ngraph/test/visitors/op/softplus.cpp +++ b/ngraph/test/visitors/op/softplus.cpp @@ -4,7 +4,7 @@ #include "unary_ops.hpp" -using Types = ::testing::Types>; +using Types = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/sqrt.cpp b/ngraph/test/visitors/op/sqrt.cpp index 7bedbe3d28a..6bf6e0e286c 100644 --- a/ngraph/test/visitors/op/sqrt.cpp +++ b/ngraph/test/visitors/op/sqrt.cpp @@ -3,8 +3,9 @@ // #include "unary_ops.hpp" -using Types = ::testing::Types, - UnaryOperatorType>; + +using Types = ::testing::Types, + UnaryOperatorType>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/squeeze.cpp b/ngraph/test/visitors/op/squeeze.cpp index 5a14b08864c..5863f255c4e 100644 --- a/ngraph/test/visitors/op/squeeze.cpp +++ b/ngraph/test/visitors/op/squeeze.cpp @@ -3,8 +3,9 @@ // #include "unary_ops.hpp" -using Types = ::testing::Types, - UnaryOperatorType>; + +using Types = ::testing::Types, + UnaryOperatorType>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/swish.cpp b/ngraph/test/visitors/op/swish.cpp index 8bfc74c0e5d..34388a44815 100644 --- a/ngraph/test/visitors/op/swish.cpp +++ b/ngraph/test/visitors/op/swish.cpp @@ -1,9 +1,10 @@ // Copyright (C) 2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // + #include "unary_ops.hpp" -using Type = ::testing::Types>; +using Type = ::testing::Types>; INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_atrribute, UnaryOperatorVisitor, diff --git a/ngraph/test/visitors/op/unary_ops.hpp b/ngraph/test/visitors/op/unary_ops.hpp index 7bf588b5231..29527416a78 100644 --- a/ngraph/test/visitors/op/unary_ops.hpp +++ b/ngraph/test/visitors/op/unary_ops.hpp @@ -4,21 +4,15 @@ #pragma once -#include #include "gtest/gtest.h" -#include "ngraph/ngraph.hpp" - -#include "ngraph/op/util/attr_types.hpp" #include "util/visitor.hpp" -using namespace ngraph; -using ngraph::test::NodeBuilder; -template +template class UnaryOperatorType { public: using op_type = T; - static constexpr element::Type_t element_type = ELEMENT_TYPE; + static constexpr ngraph::element::Type_t element_type = ELEMENT_TYPE; }; template class UnaryOperatorVisitor : public testing::Test @@ -32,11 +26,9 @@ public: static std::string GetName(int) { using OP_Type = typename T::op_type; - constexpr element::Type precision(T::element_type); + constexpr ngraph::element::Type precision(T::element_type); const ngraph::Node::type_info_t typeinfo = OP_Type::get_type_info_static(); - std::string op_name{typeinfo.name}; - op_name.append("_"); - return (op_name.append(precision.get_type_name())); + return std::string{typeinfo.name} + "_" + precision.get_type_name(); } }; @@ -45,13 +37,13 @@ TYPED_TEST_SUITE_P(UnaryOperatorVisitor); TYPED_TEST_P(UnaryOperatorVisitor, No_Attribute_4D) { using OP_Type = typename TypeParam::op_type; - const element::Type_t element_type = TypeParam::element_type; + const ngraph::element::Type_t element_type = TypeParam::element_type; - NodeBuilder::get_ops().register_factory(); - const auto A = std::make_shared(element_type, PartialShape{2, 2, 2, 2}); + ngraph::test::NodeBuilder::get_ops().register_factory(); + const auto A = std::make_shared(element_type, ngraph::PartialShape{2, 2, 2, 2}); const auto op_func = std::make_shared(A); - NodeBuilder builder(op_func); + ngraph::test::NodeBuilder builder(op_func); const auto expected_attr_count = 0; EXPECT_EQ(builder.get_value_map_size(), expected_attr_count); }