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

Method SetUpTestCase

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

Source from the content-addressed store, hash-verified

29namespace mdf::test {
30
31void TestZlib::SetUpTestCase() {
32 std::error_code er;
33 remove_all(kTestDir, er);
34
35 try {
36 create_directories(kTestDir);
37 if (!exists(kSourceFile)) {
38 throw std::runtime_error("Source file missing. Skip test.");
39 }
40 path source(kSourceFile);
41
42 path dest(kTestDir);
43 dest.append(kTestFileName);
44
45 copy_file(source, dest);
46
47 kTestFile = dest.string();
48
49 path deflate(kTestDir);
50 deflate.append(kDeflateFileName);
51 kDeflateFile = deflate.string();
52
53 path inflate(kTestDir);
54 inflate.append(kInflateFileName);
55 kInflateFile = inflate.string();
56
57 } catch (const std::exception& err) {
58 std::cout << "Skipping Test. Error: " << err.what() << std::endl;
59 skip_test_ = true;
60 }
61}
62
63void TestZlib::TearDownTestCase() {
64 std::error_code err;

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected