Sha256: e621a2aa0fbe03a92e14333bb3c9ae80a3f1ec11c0f75eb1a383b84b027e20cc
Contents?: true
Size: 722 Bytes
Versions: 93
Compression:
Stored size: 722 Bytes
Contents
#include "TestSupport.h" #include "Utils/SystemTime.h" using namespace Passenger; using namespace std; namespace tut { struct SystemTimeTest { ~SystemTimeTest() { SystemTime::release(); } }; DEFINE_TEST_GROUP(SystemTimeTest); TEST_METHOD(1) { time_t begin = SystemTime::get(); SystemTime::force(1); ensure_equals(SystemTime::get(), (time_t) 1); SystemTime::release(); time_t now = SystemTime::get(); ensure(now >= begin && now <= begin + 2); } TEST_METHOD(2) { time_t begin = SystemTime::get(); SystemTime::force(1); ensure_equals(SystemTime::get(), (time_t) 1); SystemTime::release(); time_t now = SystemTime::get(); ensure(now >= begin && now <= begin + 2); } }
Version data entries
93 entries across 93 versions & 4 rubygems