mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-20 09:26:27 +00:00
a34b759720
. timer, config: fix definition of ALLOW_RDTSC . add movsx_be64 (for whirlpool), revise implementation, move to byte_order, add test . MAX -> std::max, remove those macros . add timestamp to system_info as requested by philip This was SVN commit r5050.
26 lines
527 B
C++
26 lines
527 B
C++
#include "lib/self_test.h"
|
|
|
|
#include <time.h>
|
|
|
|
#include "lib/res/file/zip.h"
|
|
|
|
class TestZip : public CxxTest::TestSuite
|
|
{
|
|
public:
|
|
void test_fat_timedate_conversion()
|
|
{
|
|
// note: FAT time stores second/2, which means converting may
|
|
// end up off by 1 second.
|
|
|
|
time_t t, converted_t;
|
|
|
|
t = time(0);
|
|
converted_t = time_t_from_FAT(FAT_from_time_t(t));
|
|
TS_ASSERT_DELTA(t, converted_t, 2);
|
|
|
|
t++;
|
|
converted_t = time_t_from_FAT(FAT_from_time_t(t));
|
|
TS_ASSERT_DELTA(t, converted_t, 2);
|
|
}
|
|
};
|