Skip to content

Commit

Permalink
Delete files created by davix-unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopblopes committed Oct 4, 2022
1 parent f2afd3b commit 23a591d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/unit/content-provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ TEST(ContentProvider, Fd) {
ASSERT_FALSE(provider.rewind());
ASSERT_EQ(provider.pullBytes(buffer, 3), -9);
}

// remove test file
ASSERT_EQ(remove(filename),0);
}

TEST(ContentProvider, FdWithOffset) {
Expand Down Expand Up @@ -143,6 +146,7 @@ TEST(ContentProvider, FdWithOffset) {
ASSERT_EQ(provider.getError(), "Invalid offset (9) given, fd contains only 9 bytes");

ASSERT_EQ(::close(fd), 0);
ASSERT_EQ(remove(filename),0);
}

TEST(ContentProvider, FdWithMaxlen) {
Expand Down Expand Up @@ -175,6 +179,7 @@ TEST(ContentProvider, FdWithMaxlen) {
ASSERT_EQ(provider.pullBytes(buffer, 1), 0);

ASSERT_EQ(::close(fd), 0);
ASSERT_EQ(remove(filename),0);
}

TEST(ContentProvider, FdWithOffsetAndMaxlen) {
Expand Down Expand Up @@ -207,6 +212,7 @@ TEST(ContentProvider, FdWithOffsetAndMaxlen) {
ASSERT_EQ(provider.pullBytes(buffer, 1), 0);

ASSERT_EQ(::close(fd), 0);
ASSERT_EQ(remove(filename),0);
}

TEST(ContentProvider, FdExcessiveLen) {
Expand Down Expand Up @@ -237,6 +243,7 @@ TEST(ContentProvider, FdExcessiveLen) {
ASSERT_EQ(provider.pullBytes(buffer, 1), 0);

ASSERT_EQ(::close(fd), 0);
ASSERT_EQ(remove(filename),0);
}

TEST(ContentProvider, Buffer) {
Expand Down

0 comments on commit 23a591d

Please sign in to comment.