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

Function TestMdf4Time

lib/mdflib/mdflib_test/src/testtimestamp.cpp:84–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void TestMdf4Time(const std::string& filepath, uint64_t time,
85 uint16_t tz_offset_min, uint16_t dst_offset_min) {
86 MdfReader reader(filepath);
87 ASSERT_TRUE(reader.IsOk());
88 ASSERT_TRUE(reader.ReadHeader());
89 const auto* file = reader.GetFile();
90 const auto* header = file->Header();
91 ASSERT_TRUE(header != nullptr);
92 const auto* local_ts = header->StartTimestamp();
93 EXPECT_EQ(local_ts->GetTimeNs(), time);
94 EXPECT_EQ(local_ts->GetDstOffsetMin(), dst_offset_min);
95 EXPECT_EQ(local_ts->GetTzOffsetMin(), tz_offset_min);
96}
97
98} // namespace
99

Callers 1

TEST_FFunction · 0.85

Calls 8

IsOkMethod · 0.45
ReadHeaderMethod · 0.45
GetFileMethod · 0.45
HeaderMethod · 0.45
StartTimestampMethod · 0.45
GetTimeNsMethod · 0.45
GetDstOffsetMinMethod · 0.45
GetTzOffsetMinMethod · 0.45

Tested by

no test coverage detected