MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / TEST_F

Function TEST_F

lib/mdflib/mdflib_test/src/testzlib.cpp:68–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68TEST_F(TestZlib, FileCompress) {
69 if (skip_test_) {
70 GTEST_SKIP() << "Skipped Test";
71 }
72
73 std::filebuf in;
74 in.open(kTestFile, std::ios_base::in | std::ios_base::binary);
75 EXPECT_TRUE(in.is_open());
76
77 std::filebuf out;
78 out.open(kDeflateFile, std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
79 EXPECT_TRUE(out.is_open());
80
81 EXPECT_TRUE(Deflate(in, out));
82
83 in.close();
84 out.close();
85
86 std::filebuf in1;
87 in1.open(kDeflateFile, std::ios_base::in | std::ios_base::binary);
88 EXPECT_TRUE(in1.is_open());
89
90 std::filebuf out1;
91 out1.open(kInflateFile, std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
92 EXPECT_TRUE(out1.is_open());
93
94 EXPECT_TRUE(Inflate(in1, out1));
95 in1.close();
96 out1.close();
97}
98
99TEST_F(TestZlib, FileToBuffCompress) {
100 if (skip_test_) {

Callers

nothing calls this directly

Calls 8

DeflateFunction · 0.85
InflateFunction · 0.85
TransposeFunction · 0.85
InvTransposeFunction · 0.85
is_openMethod · 0.80
openMethod · 0.45
closeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected