janwas
e0dfbe719d
(these are the old self-tests ripped out as well as new ones) note: have not run yet; several would surely fail if they run (can't anyway until cxxtest is installed) This was SVN commit r3912.
24 lines
510 B
C++
24 lines
510 B
C++
#include <cxxtest/TestSuite.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);
|
|
}
|
|
};
|