add unittest for a case when ctx:sleep is called without clock

This commit is contained in:
falsycat 2023-08-13 13:00:47 +09:00
parent a3043963da
commit 281f70adb4

View File

@ -163,6 +163,13 @@ TEST_P(LuaJIT_Lambda, CtxSleep) {
EXPECT_GE(end-begin, 100ms);
}
TEST_P(LuaJIT_Lambda, CtxSleepWithoutClock) {
Expect(
"local ctx = ...\nctx:sleep(100)",
{nf7::Value {}},
0, 1);
}
TEST_P(LuaJIT_Lambda, CtxLogging) {
const auto logger = std::make_shared<nf7::subsys::test::LoggerMock>();