| 39 | } |
| 40 | |
| 41 | TEST(CCOpTest, Basic) { |
| 42 | Scope root = Scope::NewRootScope(); |
| 43 | auto c = Const(root, {{1, 1}}); |
| 44 | // NOTE: The recommended style for constructing ops is |
| 45 | // auto v = OpConstructor(t0, t1, ..); |
| 46 | // Since the wrappers are implemented as one class per op, the following |
| 47 | // style is also possible : |
| 48 | // PrimitiveOp p(t0, t1, ...); |
| 49 | // It's being used here ONLY to ensure that, that style is tested. |
| 50 | MatMul m(root, c, {{41}, {1}}); |
| 51 | TF_EXPECT_OK(root.status()); |
| 52 | Tensor out; |
| 53 | test::GetTensor(root, m, &out); |
| 54 | test::ExpectTensorEqual<int>(out, test::AsTensor<int>({42}, {1, 1})); |
| 55 | } |
| 56 | |
| 57 | TEST(CCOpTest, Attrs) { |
| 58 | Scope root = Scope::NewRootScope(); |
nothing calls this directly
no test coverage detected