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

Function TEST

tensorflow/core/lib/io/buffered_inputstream_test.cc:33–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33TEST(BufferedInputStream, ReadLine_Empty) {
34 Env* env = Env::Default();
35 string fname = testing::TmpDir() + "/buffered_inputstream_test";
36 TF_ASSERT_OK(WriteStringToFile(env, fname, ""));
37 std::unique_ptr<RandomAccessFile> file;
38 TF_ASSERT_OK(env->NewRandomAccessFile(fname, &file));
39
40 for (auto buf_size : BufferSizes()) {
41 std::unique_ptr<RandomAccessInputStream> input_stream(
42 new RandomAccessInputStream(file.get()));
43 BufferedInputStream in(input_stream.get(), buf_size);
44 string line;
45 EXPECT_TRUE(errors::IsOutOfRange(in.ReadLine(&line)));
46 }
47}
48
49TEST(BufferedInputStream, ReadLine1) {
50 Env* env = Env::Default();

Callers

nothing calls this directly

Calls 12

DefaultFunction · 0.85
TmpDirFunction · 0.85
WriteStringToFileFunction · 0.85
BufferSizesFunction · 0.70
NewRandomAccessFileMethod · 0.45
getMethod · 0.45
ReadLineMethod · 0.45
TellMethod · 0.45
ReadNBytesMethod · 0.45
SkipNBytesMethod · 0.45
SeekMethod · 0.45
ReadAllMethod · 0.45

Tested by

no test coverage detected