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

Function TestCase1

tensorflow/core/kernels/data/cache_dataset_ops_test.cc:99–111  ·  view source on GitHub ↗

Test case 1: cache data in file.

Source from the content-addressed store, hash-verified

97
98// Test case 1: cache data in file.
99TestCase TestCase1() {
100 return {/*input_tensors*/ {CreateTensor<int64>(TensorShape{3, 3, 1},
101 {0, 1, 2, 3, 4, 5, 6, 7, 8})},
102 /*file_name*/ absl::StrCat(testing::TmpDir(), "/cache_data"),
103 /*expected_outputs*/
104 {CreateTensor<int64>(TensorShape{3, 1}, {0, 1, 2}),
105 CreateTensor<int64>(TensorShape{3, 1}, {3, 4, 5}),
106 CreateTensor<int64>(TensorShape{3, 1}, {6, 7, 8})},
107 /*expected_output_dtypes*/ {DT_INT64},
108 /*expected_output_shapes*/ {PartialTensorShape({3, 1})},
109 /*expected_cardinality*/ 3,
110 /*breakpoints*/ {0, 2, 4, 11}};
111}
112
113// Test case 2: cache empty data in file.
114TestCase TestCase2() {

Callers 2

TEST_FFunction · 0.70

Calls 3

TmpDirFunction · 0.85
PartialTensorShapeClass · 0.85
StrCatFunction · 0.50

Tested by

no test coverage detected