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

Function TEST

tensorflow/core/lib/io/inputbuffer_test.cc:38–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38TEST(InputBuffer, ReadLine_Empty) {
39 Env* env = Env::Default();
40 string fname = testing::TmpDir() + "/inputbuffer_test";
41 TF_ASSERT_OK(WriteStringToFile(env, fname, ""));
42
43 for (auto buf_size : BufferSizes()) {
44 std::unique_ptr<RandomAccessFile> file;
45 TF_CHECK_OK(env->NewRandomAccessFile(fname, &file));
46 string line;
47 io::InputBuffer in(file.get(), buf_size);
48 EXPECT_TRUE(errors::IsOutOfRange(in.ReadLine(&line)));
49 }
50}
51
52TEST(InputBuffer, ReadLine1) {
53 Env* env = Env::Default();

Callers

nothing calls this directly

Calls 15

DefaultFunction · 0.85
TmpDirFunction · 0.85
WriteStringToFileFunction · 0.85
PutVarint32Function · 0.85
PutVarint64Function · 0.85
ReadVarint32Method · 0.80
ReadVarint64Method · 0.80
BufferSizesFunction · 0.70
StrContainsFunction · 0.50
maxFunction · 0.50
NewRandomAccessFileMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected