Imported Upstream version 1.12.0
[platform/core/ml/nnfw.git] / runtime / onert / test / graph / MockNode.h
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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  */
16
17 #ifndef __ONERT_TEST_GRAPH_MOCK_NODE_H__
18 #define __ONERT_TEST_GRAPH_MOCK_NODE_H__
19
20 #include "ir/Operation.h"
21 #include "ir/OperandIndexSequence.h"
22
23 namespace onert_test
24 {
25 namespace ir
26 {
27
28 class SimpleMock : public onert::ir::Operation
29 {
30 public:
31   SimpleMock(const onert::ir::OperandIndexSequence &inputs,
32              const onert::ir::OperandIndexSequence &outputs)
33     : Operation{onert::ir::OperandConstraint::createAny()}
34   {
35     setInputs(inputs);
36     setOutputs(outputs);
37   }
38
39 public:
40   void accept(onert::ir::OperationVisitor &) const override {}
41   onert::ir::OpCode opcode() const final { return onert::ir::OpCode::Invalid; }
42 };
43
44 } // namespace ir
45 } // namespace onert_test
46
47 #endif // __ONERT_TEST_GRAPH_MOCK_NODE_H__