summaryrefslogtreecommitdiff
path: root/test/libapt/getlistoffilesindir_test.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-05-04 18:24:57 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-05-04 18:42:37 +0200
commit1d77c915005f7630949e2ce706055ee3235009b6 (patch)
treed10b246f29198a4085e2923a53e4d8bafff73bcc /test/libapt/getlistoffilesindir_test.cc
parent39d9e217a22901892647499ee695ba472a111d25 (diff)
Prevent GTest from flooding us with compiler warnings
GTest has a bunch of undefined macros which causes the compiler to spit out warnings for each one on each test file. There isn't much we can do, so we just disable the warning for the testcases. Other warnings like sign-promo and sign-compare we can avoid by being more explicit about our expected integer constants being unsigned. As we are just changing testcases, there is no user visible change which would deserve to be noted in the changelog. Gbp-Dch: Ignore Reported-By: gcc-8
Diffstat (limited to 'test/libapt/getlistoffilesindir_test.cc')
-rw-r--r--test/libapt/getlistoffilesindir_test.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/libapt/getlistoffilesindir_test.cc b/test/libapt/getlistoffilesindir_test.cc
index ba4f9f6ef..f00235504 100644
--- a/test/libapt/getlistoffilesindir_test.cc
+++ b/test/libapt/getlistoffilesindir_test.cc
@@ -52,13 +52,13 @@ TEST(FileUtlTest,GetListOfFilesInDir)
// Files with no extension
_error->PushToStack();
std::vector<std::string> files = GetListOfFilesInDir(tempdir, "", true);
- ASSERT_EQ(2, files.size());
+ ASSERT_EQ(2u, files.size());
EXPECT_EQ(P("01yet-anothernormalfile"), files[0]);
EXPECT_EQ(P("anormalfile"), files[1]);
// Files with no extension - should be the same as above
files = GetListOfFilesInDir(tempdir, "", true, true);
- ASSERT_EQ(2, files.size());
+ ASSERT_EQ(2u, files.size());
EXPECT_EQ(P("01yet-anothernormalfile"), files[0]);
EXPECT_EQ(P("anormalfile"), files[1]);
@@ -68,13 +68,13 @@ TEST(FileUtlTest,GetListOfFilesInDir)
// Files with impossible or no extension
files = GetListOfFilesInDir(tempdir, "impossible", true, true);
- ASSERT_EQ(2, files.size());
+ ASSERT_EQ(2u, files.size());
EXPECT_EQ(P("01yet-anothernormalfile"), files[0]);
EXPECT_EQ(P("anormalfile"), files[1]);
// Files with list extension - nothing more
files = GetListOfFilesInDir(tempdir, "list", true);
- ASSERT_EQ(4, files.size());
+ ASSERT_EQ(4u, files.size());
EXPECT_EQ(P("01yet-anotherapt.list"), files[0]);
EXPECT_EQ(P("anormalapt.list"), files[1]);
EXPECT_EQ(P("linkedfile.list"), files[2]);
@@ -82,7 +82,7 @@ TEST(FileUtlTest,GetListOfFilesInDir)
// Files with conf or no extension
files = GetListOfFilesInDir(tempdir, "conf", true, true);
- ASSERT_EQ(5, files.size());
+ ASSERT_EQ(5u, files.size());
EXPECT_EQ(P("01yet-anotherapt.conf"), files[0]);
EXPECT_EQ(P("01yet-anothernormalfile"), files[1]);
EXPECT_EQ(P("anormalapt.conf"), files[2]);
@@ -91,14 +91,14 @@ TEST(FileUtlTest,GetListOfFilesInDir)
// Files with disabled extension - nothing more
files = GetListOfFilesInDir(tempdir, "disabled", true);
- ASSERT_EQ(3, files.size());
+ ASSERT_EQ(3u, files.size());
EXPECT_EQ(P("disabledfile.conf.disabled"), files[0]);
EXPECT_EQ(P("disabledfile.disabled"), files[1]);
EXPECT_EQ(P("disabledfile.list.disabled"), files[2]);
// Files with disabled or no extension
files = GetListOfFilesInDir(tempdir, "disabled", true, true);
- ASSERT_EQ(5, files.size());
+ ASSERT_EQ(5u, files.size());
EXPECT_EQ(P("01yet-anothernormalfile"), files[0]);
EXPECT_EQ(P("anormalfile"), files[1]);
EXPECT_EQ(P("disabledfile.conf.disabled"), files[2]);