1 //*****************************************************************************
2 // Copyright 2017-2020 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //*****************************************************************************
17 #include "gtest/gtest.h"
18 #include "ngraph/ngraph.hpp"
19 #include "util/engine/test_engines.hpp"
20 #include "util/test_case.hpp"
21 #include "util/test_control.hpp"
23 NGRAPH_SUPPRESS_DEPRECATED_START
26 using namespace ngraph;
28 static string s_manifest = "${MANIFEST}";
29 using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME});
31 NGRAPH_TEST(${BACKEND_NAME}, logical_or)
34 auto A = make_shared<op::Parameter>(element::boolean, shape);
35 auto B = make_shared<op::Parameter>(element::boolean, shape);
36 auto f = make_shared<Function>(make_shared<op::Or>(A, B), ParameterVector{A, B});
38 std::vector<char> a{1, 0, 1, 1, 1, 0, 1, 0};
39 std::vector<char> b{0, 0, 1, 0, 0, 1, 1, 0};
41 auto test_case = test::TestCase<TestEngine>(f);
42 test_case.add_multiple_inputs<char>({a, b});
43 test_case.add_expected_output<char>(shape, {1, 0, 1, 1, 1, 1, 1, 0});