14 EXPECT_NOTNULL(current_dir);
20 EXPECT_NOTNULL(current);
25 EXPECT_NOTNULL(current);
34 EXPECT_NOTNULL(system_temp);
39 EXPECT_NOTNULL(system_temp);
47 const char* kTempPrefix =
"test_prefix";
49 EXPECT_NOTNULL(system_temp);
52 EXPECT_NOTNULL(temp_dir);
55 EXPECT_NOTNULL(strstr(temp_dir, kTempPrefix));
63 EXPECT_NOTNULL(current);
66 EXPECT_NOTNULL(system_temp);
71 EXPECT_NOTNULL(new_current);
73 EXPECT_NOTNULL(strstr(new_current, system_temp));
79 const char* kTempDirName =
"create_delete_test_name";
82 EXPECT_NOTNULL(system_temp);
84 const intptr_t name_len =
85 snprintf(
nullptr, 0,
"%s/%s", system_temp, kTempDirName);
87 char*
name =
new char[name_len + 1];
88 snprintf(
name, name_len + 1,
"%s/%s", system_temp, kTempDirName);
104 const char* kTempDirName =
"rename_test_name";
107 EXPECT_NOTNULL(system_temp);
109 const intptr_t name_len =
110 snprintf(
nullptr, 0,
"%s/%s", system_temp, kTempDirName);
112 char*
name =
new char[name_len + 1];
113 snprintf(
name, name_len + 1,
"%s/%s", system_temp, kTempDirName);
123 const intptr_t new_name_len =
124 snprintf(
nullptr, 0,
"%s/%snewname", system_temp, kTempDirName);
126 char* new_name =
new char[new_name_len + 1];
127 snprintf(new_name, new_name_len + 1,
"%s/%snewname", system_temp,
static bool SetCurrent(Namespace *namespc, const char *path)
static bool Create(Namespace *namespc, const char *path)
static ExistsResult Exists(Namespace *namespc, const char *path)
static char * CurrentNoScope()
static bool Rename(Namespace *namespc, const char *path, const char *new_path)
static bool Delete(Namespace *namespc, const char *path, bool recursive)
static const char * CreateTemp(Namespace *namespc, const char *path)
static const char * Current(Namespace *namespc)
static const char * SystemTemp(Namespace *namespc)
TEST_CASE(DirectoryCurrent)
VM_UNIT_TEST_CASE(DirectoryCurrentNoScope)