X-Git-Url: https://yaffs.net/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Funit_tests%2F64_and_32_bit_time%2F32_bit%2Ftime_32_tests.c;fp=direct%2Ftest-framework%2Funit_tests%2F64_and_32_bit_time%2F32_bit%2Ftime_32_tests.c;h=9c99242074dc280b55f1bc0cdea130c0cd866e91;hp=0000000000000000000000000000000000000000;hb=e12e51da5815d80399ec8f5b0da69c7cd7a0f42e;hpb=ebc54da9e29be1de79d77c72c0d8eb91833c641b diff --git a/direct/test-framework/unit_tests/64_and_32_bit_time/32_bit/time_32_tests.c b/direct/test-framework/unit_tests/64_and_32_bit_time/32_bit/time_32_tests.c new file mode 100644 index 0000000..9c99242 --- /dev/null +++ b/direct/test-framework/unit_tests/64_and_32_bit_time/32_bit/time_32_tests.c @@ -0,0 +1,28 @@ +#include "yaffsfs.h" +#define YAFFS_MOUNT_POINT "/yflash2/" +#define FILE_PATH "/yflash2/foo.txt" + +int random_seed; +int simulate_power_failure = 0; + + +int main() +{ + yaffs_start_up(); + + //test that ytime is 32 bits + + if (sizeof(YTIME_T) != 4) { + printf("Error:size of YTIME_T is %lu, not 32 bits \n", sizeof(YTIME_T)*8); + return 1; + } + + + //create several times and save them + // + + //extra tests + //save the time and get it to overflow. + printf("all tests pass\n"); + return 0; +}