| 196 | } |
| 197 | |
| 198 | TEST(FingerprintOpShapeFnTest, MethodKnownStatically) { |
| 199 | ShapeInferenceTestOp op("Fingerprint"); |
| 200 | |
| 201 | Tensor method(DT_STRING, TensorShape{}); |
| 202 | method.scalar<tstring>()() = "farmhash64"; |
| 203 | op.input_tensors.assign({nullptr, &method}); |
| 204 | |
| 205 | TF_ASSERT_OK(MakeNodeDef(DT_UINT8, &op.node_def)); |
| 206 | INFER_OK(op, "?;?", "[?,8]"); |
| 207 | INFER_ERROR("must be at least rank 1", op, "[];?"); |
| 208 | INFER_OK(op, "[?];?", "[d0_0,8]"); |
| 209 | INFER_OK(op, "[1,?];?", "[d0_0,8]"); |
| 210 | INFER_OK(op, "[?,2,3];?", "[d0_0,8]"); |
| 211 | } |
| 212 | |
| 213 | TEST(FingerprintOpShapeFnTest, MethodUnknownStatically) { |
| 214 | ShapeInferenceTestOp op("Fingerprint"); |
nothing calls this directly
no test coverage detected