MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / TEST_CLASS

Function TEST_CLASS

IntelPresentMon/UnitTests/LoggingTests.cpp:103–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101 }
102
103 TEST_CLASS(LoggingCrashTests)
104 {
105 public:
106 TEST_METHOD(ChannelTryFlushForTimesOutWhenWorkerBlocked)
107 {
108 auto pChannel = std::make_shared<Channel>();
109 auto pDriver = std::make_shared<BlockingDriver_>();
110 pChannel->AttachComponent(pDriver, "drv:block");
111
112 pChannel->Submit(MakeEntry_());
113 pDriver->entered.acquire();
114
115 const auto timedOut = pChannel->TryFlushFor(10ms);
116 Assert::IsFalse(timedOut);
117
118 pDriver->release.release();
119 const auto flushed = pChannel->TryFlushFor(500ms);
120 Assert::IsTrue(flushed);
121 }
122
123 TEST_METHOD(CrashFlushUsesConfiguredTimeout)
124 {

Callers

nothing calls this directly

Calls 4

MakeEntry_Function · 0.85
AttachComponentMethod · 0.45
SubmitMethod · 0.45
TryFlushForMethod · 0.45

Tested by

no test coverage detected