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

Function TEST_F

lib/mdflib/mdflib_test/src/testread.cpp:116–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116TEST_F(TestRead, Read) // NOLINT
117{
118 if (kMdfList.empty()) {
119 GTEST_SKIP_("No MDF files found." );
120 }
121
122 for (const auto& [name, filename] : kMdfList) {
123 const auto start1 = steady_clock::now();
124
125 MdfReader oRead(filename);
126 EXPECT_TRUE(oRead.IsOk()) << name;
127 const auto* mdf_file = oRead.GetFile();
128
129 EXPECT_TRUE(mdf_file != nullptr) << name;
130 EXPECT_TRUE(oRead.ReadEverythingButData()) << name;
131
132 const auto stop1 = steady_clock::now();
133 const auto diff1 = duration_cast<milliseconds>(stop1 - start1);
134
135 auto* dg_group = oRead.GetDataGroup(0);
136 if (dg_group == nullptr) {
137 continue;
138 }
139 const auto start2 = steady_clock::now();
140 ISampleObserver observer(*dg_group);
141 oRead.ReadData(*dg_group);
142
143 const auto stop2 = steady_clock::now();
144 const auto diff2 = duration_cast<milliseconds>(stop2 - start2);
145 std::cout << "File: " << name << " (" << diff1.count()
146 << "/" << diff2.count() << " ms)" << std::endl;
147 }
148}
149
150TEST_F(TestRead, MdfFile) // NOLINT
151{

Callers

nothing calls this directly

Calls 15

GetMdfFileFunction · 0.85
CreateChannelObserverFunction · 0.85
IsMdfFileFunction · 0.85
emptyMethod · 0.80
FileIdMethod · 0.80
VersionStringMethod · 0.80
HeaderBlockMethod · 0.80
cbeginMethod · 0.80
cendMethod · 0.80
ReadPartialDataMethod · 0.80

Tested by

no test coverage detected