MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ExpectSuccess

Method ExpectSuccess

tensorflow/core/framework/op_kernel_test.cc:163–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 }
162
163 void ExpectSuccess(const string& op_type, DeviceType device_type,
164 const DataTypeVector& inputs,
165 const DataTypeVector& outputs) {
166 Status status;
167 std::unique_ptr<OpKernel> op(CreateOpKernel(
168 std::move(device_type), &device_, cpu_allocator(),
169 CreateNodeDef(op_type, inputs), TF_GRAPH_DEF_VERSION, &status));
170 EXPECT_TRUE(status.ok()) << status;
171 EXPECT_TRUE(op != nullptr);
172 if (op != nullptr) {
173 ExpectEqual("inputs", op->input_types(), inputs);
174 ExpectEqual("outputs", op->output_types(), outputs);
175 }
176 }
177
178 void ExpectFailure(const string& ascii_node_def, DeviceType device_type,
179 error::Code code) {

Callers

nothing calls this directly

Calls 5

CreateOpKernelFunction · 0.85
cpu_allocatorFunction · 0.85
ExpectEqualFunction · 0.70
okMethod · 0.45
output_typesMethod · 0.45

Tested by

no test coverage detected