MCPcopy Create free account
hub / github.com/apache/singa / TEST

Function TEST

test/singa/test_textfile_rw.cc:29–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27using singa::io::TextFileReader;
28using singa::io::TextFileWriter;
29TEST(TextFileWriter, Create) {
30 TextFileWriter writer;
31 bool ret;
32 ret = writer.Open(path_csv, singa::io::kCreate);
33 EXPECT_EQ(true, ret);
34
35 std::string key = "";
36 std::string value = "This is a test for binfile io.";
37 ret = writer.Write(key, value);
38 EXPECT_EQ(true, ret);
39
40 ret = writer.Write(key, value);
41 EXPECT_EQ(true, ret);
42
43 writer.Flush();
44 writer.Close();
45}
46
47TEST(TextFileWriter, Append) {
48 TextFileWriter writer;

Callers

nothing calls this directly

Calls 7

OpenMethod · 0.45
WriteMethod · 0.45
FlushMethod · 0.45
CloseMethod · 0.45
CountMethod · 0.45
ReadMethod · 0.45
SeekToFirstMethod · 0.45

Tested by

no test coverage detected