Sha256: 72e3a13374f338e04253af11525aef69b85e9620022dc11327669beabc3084b1
Contents?: true
Size: 708 Bytes
Versions: 23
Compression:
Stored size: 708 Bytes
Contents
#include "tut.h" #include "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
23 entries across 23 versions & 4 rubygems