Merge remote-tracking branch 'origin/64_and_32_bit_time_tests'
[yaffs2.git] / direct / test-framework / unit_tests / 64_and_32_bit_time / 32_bit / time_32_tests.c
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 (file)
index 0000000..9c99242
--- /dev/null
@@ -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;
+}