szdytom f0445542ce
Add procedure call impl
Signed-off-by: szdytom <szdytom@qq.com>
2024-02-04 13:47:53 +08:00

20 lines
443 B
C++

#include "test/u.hpp"
#include <chrono>
#include <thread>
namespace {
AddTestCase _(0, "tester", [](TestCase& t) {
t.expectTrue([] { return true; });
t.expectFalse([] { return false; });
t.expectTrue([] {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
return true;
});
t.expectEq<int>([] { return 42; }, 42);
t.expectEq<float>([] { return 10 + 1e-7; }, 10);
t.expectEq<double>([] { return 10 + 1e-10; }, 10);
});
}