diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/interactive-helper/aptwebserver.cc | 2 | ||||
-rw-r--r-- | test/libapt/fileutl_test.cc | 4 | ||||
-rw-r--r-- | test/libapt/srvrecs_test.cc | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc index 4b98cbd7c..22fc4121b 100644 --- a/test/interactive-helper/aptwebserver.cc +++ b/test/interactive-helper/aptwebserver.cc @@ -127,7 +127,7 @@ static bool sendHead(std::ostream &log, int const client, int const httpcode, st std::stringstream buffer; auto const empties = _config->FindVector("aptwebserver::empty-response-header"); - for (auto && e: empties) + for (auto const &e: empties) buffer << e << ":" << std::endl; _config->Dump(buffer, "aptwebserver::response-header", "%t: %v%n", false); std::vector<std::string> addheaders = VectorizeString(buffer.str(), '\n'); diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc index 67bd850a1..d11622019 100644 --- a/test/libapt/fileutl_test.cc +++ b/test/libapt/fileutl_test.cc @@ -25,7 +25,9 @@ static void TestFileFd(mode_t const a_umask, mode_t const ExpectedFilePermission static const char* fname = "apt-filefd-test.txt"; if (FileExists(fname) == true) + { EXPECT_EQ(0, unlink(fname)); + } FileFd f; umask(a_umask); @@ -290,7 +292,9 @@ TEST(FileUtlTest, Popen) // ensure that after a close all is good again if(FileExists("/proc/self/fd")) + { EXPECT_EQ(Glob("/proc/self/fd/*").size(), OpenFds.size()); + } // ReadWrite is not supported _error->PushToStack(); diff --git a/test/libapt/srvrecs_test.cc b/test/libapt/srvrecs_test.cc index 5253b1c34..4fcc96dae 100644 --- a/test/libapt/srvrecs_test.cc +++ b/test/libapt/srvrecs_test.cc @@ -77,7 +77,9 @@ TEST(SrvRecTest,Randomness) EXPECT_TRUE(std::all_of(first_pull.begin(), first_pull.end(), [](SrvRec const &R) { return R.priority == 20; })); EXPECT_TRUE(std::all_of(second_pull.begin(), second_pull.end(), [](SrvRec const &R) { return R.priority == 20; })); if (startingClock != -1 && startingClock != clock()) + { EXPECT_FALSE(std::equal(first_pull.begin(), first_pull.end(), second_pull.begin())); + } EXPECT_TRUE(std::all_of(base2.begin(), base2.end(), [](SrvRec const &R) { return R.priority == 30; })); } |