MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / TEST

Function TEST

Engine/source/platform/test/platformFileIOTest.cpp:30–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include "console/console.h"
29
30TEST(Platform, ExcludedDirectories)
31{
32 // Just dump everything under the current directory. We should
33 // find at least one file.
34
35 // Exclude .svn and CVS
36 Platform::clearExcludedDirectories();
37 Platform::addExcludedDirectory(".svn");
38 Platform::addExcludedDirectory("CVS");
39
40 EXPECT_TRUE(Platform::isExcludedDirectory(".svn"))
41 << "On list, should be excluded.";
42 EXPECT_TRUE(Platform::isExcludedDirectory("CVS"))
43 << "On list, should be excluded.";
44 EXPECT_FALSE(Platform::isExcludedDirectory("foo"))
45 << "Doesn't match list, shouldn't be excluded.";
46 EXPECT_FALSE(Platform::isExcludedDirectory(".svnCVS"))
47 << "Looks like a duck, but it shouldn't be excluded cuz it's distinct from all entries on the exclusion list.";
48
49 // Ok, now our exclusion list is setup, so let's dump some paths.
50 Vector<Platform::FileInfo> pathInfo;
51 Platform::dumpPath(Platform::getCurrentDirectory(), pathInfo, 2);
52 EXPECT_GT(pathInfo.size(), 0)
53 << "Should find at least SOMETHING in the current directory!";
54
55 // This'll nuke info if we run it in a live situation... so don't run unit
56 // tests in a live situation. ;)
57 Platform::clearExcludedDirectories();
58};
59
60TEST(File, TouchAndTime)
61{

Callers

nothing calls this directly

Calls 5

openMethod · 0.65
closeMethod · 0.65
dFileTouchFunction · 0.50
dFileDeleteFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected