From e0fa082cf9b971bda6494d2d0f445c6dac056195 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Thu, 13 Jul 2023 18:43:01 -0500 Subject: [PATCH] sleep for an actual tick (also do so between dfiletouch and isfile on the off chance the o/s is choking) --- Engine/source/platform/test/platformFileIOTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Engine/source/platform/test/platformFileIOTest.cpp b/Engine/source/platform/test/platformFileIOTest.cpp index 198baca4f..0afd61593 100644 --- a/Engine/source/platform/test/platformFileIOTest.cpp +++ b/Engine/source/platform/test/platformFileIOTest.cpp @@ -68,13 +68,17 @@ TEST(File, TouchAndTime) // Touch a file and note its last-modified. dFileTouch("testTouch.file"); + + // Sleep for a tick + Platform::sleep(32); + EXPECT_TRUE(Platform::isFile("testTouch.file")) << "We just touched this file - it should exist."; EXPECT_TRUE(Platform::getFileTimes("testTouch.file", &create[0], &modify[0])) << "Failed to get filetimes for a file we just created."; // Sleep for a tick - Platform::sleep(10); + Platform::sleep(32); // Touch it again, and compare the last-modifieds. EXPECT_TRUE(Platform::isFile("testTouch.file"))