MCPcopy Create free account
hub / github.com/crayzeewulf/libserial / TEST_F

Function TEST_F

test/MultiThreadUnitTests.cpp:273–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273TEST_F(MultiThreadUnitTests, testMultiThreadSerialStreamReadWrite)
274{
275 SCOPED_TRACE("Test Multi-Thread Serial Stream Communication.") ;
276
277 failureRate = 0 ;
278 loopCount = 0 ;
279
280 for (size_t i = 0; i < TEST_ITERATIONS; i++)
281 {
282 testMultiThreadSerialStreamReadWrite() ;
283 }
284
285 const auto failRate = (
286 100. * static_cast<double>(failureRate) /
287 static_cast<double>(loopCount)
288 ) ;
289
290 // If the serial communication fail rate is greater than 0.0001% consider it a failed test.
291 if (failRate > 0.0001)
292 {
293 std::cout << "\t SerialStream Failure Rate = " << failRate << "%" << std::endl;
294 ADD_FAILURE() ;
295 }
296}
297
298TEST_F(MultiThreadUnitTests, testMultiThreadSerialPortReadWrite)
299{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected