From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Mar 2014 22:11:25 +0100 Subject: cleanup headers and especially #includes everywhere Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use) --- test/libapt/cdromfindpackages_test.cc | 4 ++++ test/libapt/cdromreducesourcelist_test.cc | 4 ++-- test/libapt/commandline_test.cc | 3 +++ test/libapt/commandlineasstring_test.cc | 2 ++ test/libapt/compareversion_test.cc | 9 ++++----- test/libapt/configuration_test.cc | 2 ++ test/libapt/fileutl_test.cc | 7 +++---- test/libapt/getarchitectures_test.cc | 5 +++-- test/libapt/getlanguages_test.cc | 2 ++ test/libapt/getlistoffilesindir_test.cc | 7 ++++--- test/libapt/globalerror_test.cc | 6 +++++- test/libapt/hashsums_test.cc | 15 +++++++++------ test/libapt/indexcopytosourcelist_test.cc | 9 ++++++--- test/libapt/parsedepends_test.cc | 6 ++++++ test/libapt/sourcelist_test.cc | 9 +++++++-- test/libapt/strutil_test.cc | 7 ++++++- test/libapt/tagfile_test.cc | 6 +++++- test/libapt/uri_test.cc | 4 ++++ 18 files changed, 77 insertions(+), 30 deletions(-) (limited to 'test/libapt') diff --git a/test/libapt/cdromfindpackages_test.cc b/test/libapt/cdromfindpackages_test.cc index e9f5a51b0..583de1423 100644 --- a/test/libapt/cdromfindpackages_test.cc +++ b/test/libapt/cdromfindpackages_test.cc @@ -1,9 +1,13 @@ +#include + #include #include #include #include #include +#include +#include #include "assert.h" diff --git a/test/libapt/cdromreducesourcelist_test.cc b/test/libapt/cdromreducesourcelist_test.cc index b0314769d..196d0136e 100644 --- a/test/libapt/cdromreducesourcelist_test.cc +++ b/test/libapt/cdromreducesourcelist_test.cc @@ -1,7 +1,7 @@ +#include + #include -#include -#include #include #include diff --git a/test/libapt/commandline_test.cc b/test/libapt/commandline_test.cc index de8a30bd6..d8c5bc5bd 100644 --- a/test/libapt/commandline_test.cc +++ b/test/libapt/commandline_test.cc @@ -1,4 +1,7 @@ +#include + #include +#include #include "assert.h" diff --git a/test/libapt/commandlineasstring_test.cc b/test/libapt/commandlineasstring_test.cc index a38957d7e..5c005e956 100644 --- a/test/libapt/commandlineasstring_test.cc +++ b/test/libapt/commandlineasstring_test.cc @@ -1,3 +1,5 @@ +#include + #include #include diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc index 44f8e9d78..43b98f240 100644 --- a/test/libapt/compareversion_test.cc +++ b/test/libapt/compareversion_test.cc @@ -16,17 +16,16 @@ ##################################################################### */ /*}}}*/ -#include +#include + #include -#include #include #include -#include -#include +#include +#include #include #include -#include #include using namespace std; diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc index d2efc1b4b..c9235500c 100644 --- a/test/libapt/configuration_test.cc +++ b/test/libapt/configuration_test.cc @@ -1,3 +1,5 @@ +#include + #include #include diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc index d256ea55a..8da832ba9 100644 --- a/test/libapt/fileutl_test.cc +++ b/test/libapt/fileutl_test.cc @@ -1,14 +1,13 @@ +#include + #include #include -#include "assert.h" #include #include - -#include -#include #include +#include "assert.h" int main() { diff --git a/test/libapt/getarchitectures_test.cc b/test/libapt/getarchitectures_test.cc index 508d5e458..f4dfc6ae8 100644 --- a/test/libapt/getarchitectures_test.cc +++ b/test/libapt/getarchitectures_test.cc @@ -1,11 +1,12 @@ +#include + #include #include -#include "assert.h" #include #include -#include +#include "assert.h" int main() { diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index 51cfecee3..15aa4e879 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -1,3 +1,5 @@ +#include + #include #include diff --git a/test/libapt/getlistoffilesindir_test.cc b/test/libapt/getlistoffilesindir_test.cc index b2c95e840..df125fc83 100644 --- a/test/libapt/getlistoffilesindir_test.cc +++ b/test/libapt/getlistoffilesindir_test.cc @@ -1,12 +1,13 @@ +#include + #include -#include "assert.h" #include #include - -#include #include +#include "assert.h" + #define P(x) std::string(argv[1]).append("/").append(x) int main(int argc,char *argv[]) diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc index 742fa53bd..e913fdc12 100644 --- a/test/libapt/globalerror_test.cc +++ b/test/libapt/globalerror_test.cc @@ -1,10 +1,14 @@ +#include + #include -#include "assert.h" +#include #include #include #include +#include "assert.h" + int main() { std::string const textOfErrnoZero(strerror(0)); diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc index 410e2c44d..d743faec6 100644 --- a/test/libapt/hashsums_test.cc +++ b/test/libapt/hashsums_test.cc @@ -1,12 +1,15 @@ +#include + #include #include #include #include #include #include -#include -#include +#include +#include +#include #include "assert.h" @@ -50,22 +53,22 @@ int main(int argc, char** argv) // test HashSumValue which doesn't calculate but just stores sums { - string md5sum = argv[2]; + std::string md5sum = argv[2]; MD5SumValue md5(md5sum); equals(md5.Value(), md5sum); } { - string sha1sum = argv[3]; + std::string sha1sum = argv[3]; SHA1SumValue sha1(sha1sum); equals(sha1.Value(), sha1sum); } { - string sha2sum = argv[4]; + std::string sha2sum = argv[4]; SHA256SumValue sha2(sha2sum); equals(sha2.Value(), sha2sum); } { - string sha2sum = argv[5]; + std::string sha2sum = argv[5]; SHA512SumValue sha2(sha2sum); equals(sha2.Value(), sha2sum); } diff --git a/test/libapt/indexcopytosourcelist_test.cc b/test/libapt/indexcopytosourcelist_test.cc index 69d8fae86..e04ab261b 100644 --- a/test/libapt/indexcopytosourcelist_test.cc +++ b/test/libapt/indexcopytosourcelist_test.cc @@ -1,8 +1,11 @@ +#include + #include #include #include #include +#include #include "assert.h" @@ -12,14 +15,14 @@ public: IndexCopy::ConvertToSourceList(CD, Path); return Path; } - bool GetFile(std::string &Filename,unsigned long long &Size) { return false; } - bool RewriteEntry(FILE *Target,std::string File) { return false; } + bool GetFile(std::string &/*Filename*/, unsigned long long &/*Size*/) { return false; } + bool RewriteEntry(FILE * /*Target*/, std::string /*File*/) { return false; } const char *GetFileName() { return NULL; } const char *Type() { return NULL; } }; -int main(int argc, char const *argv[]) { +int main() { NoCopy ic; std::string const CD("/media/cdrom/"); diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc index 5a2c65573..5564e2bc0 100644 --- a/test/libapt/parsedepends_test.cc +++ b/test/libapt/parsedepends_test.cc @@ -1,5 +1,11 @@ +#include + #include #include +#include + +#include +#include #include "assert.h" diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc index 0637df03b..71aa54f1e 100644 --- a/test/libapt/sourcelist_test.cc +++ b/test/libapt/sourcelist_test.cc @@ -1,11 +1,16 @@ +#include + +#include #include -#include +#include -#include "assert.h" +#include #include #include #include +#include "assert.h" + char *tempfile = NULL; int tempfile_fd = -1; diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc index a4516e7a1..618f4daba 100644 --- a/test/libapt/strutil_test.cc +++ b/test/libapt/strutil_test.cc @@ -1,5 +1,10 @@ +#include + #include +#include +#include + #include "assert.h" int main() @@ -44,7 +49,7 @@ int main() // Split input = "status: libnet1:amd64: unpacked"; - vector result = StringSplit(input, ": "); + std::vector result = StringSplit(input, ": "); equals(result[0], "status"); equals(result[1], "libnet1:amd64"); equals(result[2], "unpacked"); diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc index 24f258275..aaf46e3e9 100644 --- a/test/libapt/tagfile_test.cc +++ b/test/libapt/tagfile_test.cc @@ -1,11 +1,15 @@ +#include + #include #include -#include "assert.h" +#include #include #include #include +#include "assert.h" + char *tempfile = NULL; int tempfile_fd = -1; diff --git a/test/libapt/uri_test.cc b/test/libapt/uri_test.cc index 8216ade71..6559f1390 100644 --- a/test/libapt/uri_test.cc +++ b/test/libapt/uri_test.cc @@ -1,5 +1,9 @@ +#include + #include +#include + #include "assert.h" int main() { -- cgit v1.2.3