1 //
2 //  ExtraTest.cpp
3 //  MNNTests
4 //
5 //  Created by MNN on 2019/09/26.
6 //  Copyright © 2018, Alibaba Group Holding Limited
7 //
8 
9 #include <MNN/expr/ExprCreator.hpp>
10 #include "MNNTestSuite.h"
11 #include "MNN_generated.h"
12 
13 using namespace MNN::Express;
14 
15 class ExtraTest : public MNNTestCase {
16 public:
run(int precision)17     virtual bool run(int precision) {
18         auto x = _Input({4}, NHWC, halide_type_of<int32_t>());
19         std::shared_ptr<MNN::OpT> extraOp(new MNN::OpT);
20         extraOp->type = MNN::OpType_Extra;
21         auto y        = Variable::create(Expr::create(extraOp.get(), {x}));
22         if (nullptr != y->getInfo() || nullptr != y->readMap<int>()) {
23             return false;
24         }
25         return true;
26     }
27 };
28 MNNTestSuiteRegister(ExtraTest, "expr/Extra");
29