use the portable platform::unlink() instead of unlink()

This commit is contained in:
Axel Kohlmeyer
2021-11-03 14:26:50 -04:00
parent 7f0b2334a5
commit b7bf60ea53
2 changed files with 6 additions and 6 deletions

View File

@ -59,8 +59,8 @@ protected:
void TearDown() override
{
LAMMPSTest::TearDown();
unlink("test_variable.file");
unlink("test_variable.atomfile");
platform::unlink("test_variable.file");
platform::unlink("test_variable.atomfile");
}
void atomic_system()
@ -165,7 +165,7 @@ TEST_F(VariableTest, CreateDelete)
fputs(" ", fp);
fclose(fp);
ASSERT_THAT(variable->retrieve("file"), StrEq("1"));
unlink("MYFILE");
platform::unlink("MYFILE");
ASSERT_THAT(variable->retrieve("file"), StrEq("0"));
BEGIN_HIDE_OUTPUT();

View File

@ -35,8 +35,8 @@ class TextFileReaderTest : public ::testing::Test {
protected:
void TearDown() override
{
unlink("text_reader_one.file");
unlink("text_reader_two.file");
platform::unlink("text_reader_one.file");
platform::unlink("text_reader_two.file");
}
void test_files()
@ -73,7 +73,7 @@ TEST_F(TextFileReaderTest, permissions)
chmod("text_reader_noperms.file", 0);
ASSERT_THROW({ TextFileReader reader("text_reader_noperms.file", "test"); },
FileReaderException);
unlink("text_reader_noperms.file");
platform::unlink("text_reader_noperms.file");
}
TEST_F(TextFileReaderTest, nofp)