Skip to content

Commit

Permalink
use parametrized vistor API
Browse files Browse the repository at this point in the history
  • Loading branch information
songbell committed Jun 22, 2021
1 parent 77660a5 commit 26e2488
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions ngraph/test/visitors/op/atan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
//

#include "gtest/gtest.h"
#include "unary_ops.hpp"

#include "ngraph/ngraph.hpp"
#include "ngraph/op/util/attr_types.hpp"
#include "ngraph/opsets/opset1.hpp"
using Types = ::testing::Types<UnaryOperatorType<ngraph::op::v0::Atan, element::f32>>;

#include "util/visitor.hpp"

using namespace std;
using namespace ngraph;
using ngraph::test::NodeBuilder;

TEST(attributes, atan_op)
{
NodeBuilder::get_ops().register_factory<op::Atan>();
const auto data_node = make_shared<op::Parameter>(element::f32, Shape{1});
const auto atan = make_shared<op::Atan>(data_node);

const NodeBuilder builder(atan);
const auto atan_attr_number = 0;

EXPECT_EQ(builder.get_value_map_size(), atan_attr_number);
}
INSTANTIATE_TYPED_TEST_CASE_P(visitor_without_attribute,
UnaryOperatorVisitor,
Types,
UnaryOperatorTypeName);

0 comments on commit 26e2488

Please sign in to comment.