summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-07-12 13:40:41 +0200
committerJulian Andres Klode <jak@debian.org>2017-07-12 13:57:51 +0200
commit87274d0f22e1dfd99b2e5200e2fe75c1b804eac3 (patch)
treeba3dd14cf899c550ea2e79a696a323bfe8479322 /test
parent78fcdd9629022c0c37742614351f5b02fed97607 (diff)
Reformat and sort all includes with clang-format
This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
Diffstat (limited to 'test')
-rw-r--r--test/interactive-helper/aptwebserver.cc4
-rw-r--r--test/interactive-helper/extract-control.cc2
-rw-r--r--test/interactive-helper/rpmver.cc6
-rw-r--r--test/interactive-helper/teestream.h2
-rw-r--r--test/interactive-helper/test_fileutl.cc8
-rw-r--r--test/interactive-helper/test_udevcdrom.cc6
-rw-r--r--test/interactive-helper/testdeb.cc4
-rw-r--r--test/libapt/acqprogress_test.cc8
-rw-r--r--test/libapt/cdrom_test.cc4
-rw-r--r--test/libapt/cdromfindpackages_test.cc2
-rw-r--r--test/libapt/compareversion_test.cc4
-rw-r--r--test/libapt/extracttar_test.cc2
-rw-r--r--test/libapt/file-helpers.cc4
-rw-r--r--test/libapt/fileutl_test.cc4
-rw-r--r--test/libapt/getlanguages_test.cc4
-rw-r--r--test/libapt/getlistoffilesindir_test.cc4
-rw-r--r--test/libapt/globalerror_test.cc2
-rw-r--r--test/libapt/gtest_runner.cc2
-rw-r--r--test/libapt/hashsums_test.cc6
-rw-r--r--test/libapt/indexcopytosourcelist_test.cc2
-rw-r--r--test/libapt/parsedepends_test.cc4
-rw-r--r--test/libapt/priority_test.cc2
-rw-r--r--test/libapt/sourcelist_test.cc2
-rw-r--r--test/libapt/strutil_test.cc2
-rw-r--r--test/libapt/tagfile_test.cc2
-rw-r--r--test/libapt/tagsection_test.cc2
-rw-r--r--test/libapt/teestream_test.cc6
-rw-r--r--test/libapt/uri_test.cc2
28 files changed, 51 insertions, 51 deletions
diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc
index cbefe48d9..b4b3ef870 100644
--- a/test/interactive-helper/aptwebserver.cc
+++ b/test/interactive-helper/aptwebserver.cc
@@ -23,10 +23,10 @@
#include <unistd.h>
#include <algorithm>
-#include <iostream>
#include <fstream>
-#include <sstream>
+#include <iostream>
#include <list>
+#include <sstream>
#include <string>
#include <thread>
#include <vector>
diff --git a/test/interactive-helper/extract-control.cc b/test/interactive-helper/extract-control.cc
index 852ec4ee9..a19e0380c 100644
--- a/test/interactive-helper/extract-control.cc
+++ b/test/interactive-helper/extract-control.cc
@@ -4,8 +4,8 @@
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <string>
#include <iostream>
+#include <string>
#include <unistd.h>
using namespace std;
diff --git a/test/interactive-helper/rpmver.cc b/test/interactive-helper/rpmver.cc
index 017c92fba..b23ba2876 100644
--- a/test/interactive-helper/rpmver.cc
+++ b/test/interactive-helper/rpmver.cc
@@ -1,11 +1,11 @@
#include <config.h>
#include <apt-pkg/debversion.h>
-#include <rpm/rpmio.h>
+#include <ctype.h>
#include <rpm/misc.h>
-#include <stdlib.h>
+#include <rpm/rpmio.h>
#include <stdio.h>
-#include <ctype.h>
+#include <stdlib.h>
#define xisdigit(x) isdigit(x)
#define xisalpha(x) isalpha(x)
diff --git a/test/interactive-helper/teestream.h b/test/interactive-helper/teestream.h
index 728a1bae2..058717ac3 100644
--- a/test/interactive-helper/teestream.h
+++ b/test/interactive-helper/teestream.h
@@ -8,8 +8,8 @@
a logfile easily, so don't expect that to be a bulletproof
implementation. */
-#include <iostream>
#include <apt-pkg/macros.h>
+#include <iostream>
template <typename CharT, typename Traits = std::char_traits<CharT>
> class basic_teebuf: public std::basic_streambuf<CharT, Traits>
diff --git a/test/interactive-helper/test_fileutl.cc b/test/interactive-helper/test_fileutl.cc
index 7c4b95759..6c29b748f 100644
--- a/test/interactive-helper/test_fileutl.cc
+++ b/test/interactive-helper/test_fileutl.cc
@@ -1,13 +1,13 @@
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/error.h>
-#include <sys/types.h>
+#include <fcntl.h>
+#include <stdlib.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
#include <iostream>
#include <string>
diff --git a/test/interactive-helper/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc
index b87dcd935..2355186d6 100644
--- a/test/interactive-helper/test_udevcdrom.cc
+++ b/test/interactive-helper/test_udevcdrom.cc
@@ -2,11 +2,11 @@
#include <apt-pkg/cdrom.h>
-#include <stddef.h>
+#include <iostream>
#include <string>
-#include <assert.h>
#include <vector>
-#include <iostream>
+#include <assert.h>
+#include <stddef.h>
int main()
{
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc
index 69e1ffe0b..0bb24a52a 100644
--- a/test/interactive-helper/testdeb.cc
+++ b/test/interactive-helper/testdeb.cc
@@ -1,10 +1,10 @@
#include <config.h>
-#include <apt-pkg/dirstream.h>
+#include <apt-pkg/arfile.h>
#include <apt-pkg/debfile.h>
+#include <apt-pkg/dirstream.h>
#include <apt-pkg/error.h>
#include <apt-pkg/extracttar.h>
-#include <apt-pkg/arfile.h>
#include <apt-pkg/fileutl.h>
#include <iostream>
diff --git a/test/libapt/acqprogress_test.cc b/test/libapt/acqprogress_test.cc
index 0e82a285d..d4596c85d 100644
--- a/test/libapt/acqprogress_test.cc
+++ b/test/libapt/acqprogress_test.cc
@@ -1,12 +1,12 @@
#include <config.h>
-#include <apt-pkg/hashes.h>
-#include <apt-pkg/acquire.h>
#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/acquire.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/hashes.h>
#include <apt-private/acqprogress.h>
-#include <string>
-#include <sstream>
#include <gtest/gtest.h>
+#include <sstream>
+#include <string>
class TestItem: public pkgAcquire::Item
{
diff --git a/test/libapt/cdrom_test.cc b/test/libapt/cdrom_test.cc
index b4c51cdb0..c9021e64e 100644
--- a/test/libapt/cdrom_test.cc
+++ b/test/libapt/cdrom_test.cc
@@ -1,13 +1,13 @@
#include <config.h>
-#include <apt-pkg/configuration.h>
#include <apt-pkg/cdrom.h>
#include <apt-pkg/cdromutl.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/fileutl.h>
#include <string>
-#include <string.h>
#include <vector>
+#include <string.h>
#include <gtest/gtest.h>
diff --git a/test/libapt/cdromfindpackages_test.cc b/test/libapt/cdromfindpackages_test.cc
index 0d8eb1f90..f6acf18fd 100644
--- a/test/libapt/cdromfindpackages_test.cc
+++ b/test/libapt/cdromfindpackages_test.cc
@@ -5,10 +5,10 @@
#include <apt-pkg/fileutl.h>
#include <algorithm>
+#include <iostream>
#include <string>
#include <vector>
#include <stddef.h>
-#include <iostream>
#include <gtest/gtest.h>
diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc
index 3b2c0c209..1782c61cc 100644
--- a/test/libapt/compareversion_test.cc
+++ b/test/libapt/compareversion_test.cc
@@ -18,15 +18,15 @@
/*}}}*/
#include <config.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/debversion.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <fstream>
#include <string>
#include <stdlib.h>
-#include <unistd.h>
#include <sys/wait.h>
+#include <unistd.h>
#include <gtest/gtest.h>
diff --git a/test/libapt/extracttar_test.cc b/test/libapt/extracttar_test.cc
index 0255bd767..30934144a 100644
--- a/test/libapt/extracttar_test.cc
+++ b/test/libapt/extracttar_test.cc
@@ -3,8 +3,8 @@
#include <iostream>
#include <stdlib.h>
-#include <gtest/gtest.h>
#include "assert.h"
+#include <gtest/gtest.h>
class Stream : public pkgDirStream
{
diff --git a/test/libapt/file-helpers.cc b/test/libapt/file-helpers.cc
index 48d8a9fbb..aa16a2e30 100644
--- a/test/libapt/file-helpers.cc
+++ b/test/libapt/file-helpers.cc
@@ -2,10 +2,10 @@
#include <string>
-#include <unistd.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <fcntl.h>
+#include <unistd.h>
#include <gtest/gtest.h>
diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc
index d11622019..6cc850033 100644
--- a/test/libapt/fileutl_test.cc
+++ b/test/libapt/fileutl_test.cc
@@ -1,10 +1,10 @@
#include <config.h>
+#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/configuration.h>
#include <algorithm>
#include <string>
diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc
index 29ff0c9ae..26ff66f72 100644
--- a/test/libapt/getlanguages_test.cc
+++ b/test/libapt/getlanguages_test.cc
@@ -10,9 +10,9 @@
#include <string>
#include <vector>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <gtest/gtest.h>
diff --git a/test/libapt/getlistoffilesindir_test.cc b/test/libapt/getlistoffilesindir_test.cc
index 8c5e56b1d..606e2733e 100644
--- a/test/libapt/getlistoffilesindir_test.cc
+++ b/test/libapt/getlistoffilesindir_test.cc
@@ -1,11 +1,11 @@
#include <config.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
+#include <iostream>
#include <string>
#include <vector>
-#include <iostream>
#include <gtest/gtest.h>
diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc
index bb36905a4..67682c275 100644
--- a/test/libapt/globalerror_test.cc
+++ b/test/libapt/globalerror_test.cc
@@ -2,9 +2,9 @@
#include <apt-pkg/error.h>
-#include <stddef.h>
#include <string>
#include <errno.h>
+#include <stddef.h>
#include <string.h>
#include <gtest/gtest.h>
diff --git a/test/libapt/gtest_runner.cc b/test/libapt/gtest_runner.cc
index 73854d976..5620aa0bd 100644
--- a/test/libapt/gtest_runner.cc
+++ b/test/libapt/gtest_runner.cc
@@ -1,9 +1,9 @@
#include <gtest/gtest.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/error.h>
#include <apt-pkg/init.h>
+#include <apt-pkg/pkgsystem.h>
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc
index fb9a25643..8b4533265 100644
--- a/test/libapt/hashsums_test.cc
+++ b/test/libapt/hashsums_test.cc
@@ -1,16 +1,16 @@
#include <config.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/hashes.h>
#include <apt-pkg/md5.h>
#include <apt-pkg/sha1.h>
#include <apt-pkg/sha2.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/hashes.h>
-#include <apt-pkg/fileutl.h>
#include <iostream>
-#include <stdlib.h>
#include <string>
+#include <stdlib.h>
#include <gtest/gtest.h>
diff --git a/test/libapt/indexcopytosourcelist_test.cc b/test/libapt/indexcopytosourcelist_test.cc
index eb6d49edf..b0bfeb4b2 100644
--- a/test/libapt/indexcopytosourcelist_test.cc
+++ b/test/libapt/indexcopytosourcelist_test.cc
@@ -1,7 +1,7 @@
#include <config.h>
-#include <apt-pkg/configuration.h>
#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/indexcopy.h>
#include <string>
diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc
index c2781b5d6..ed849f768 100644
--- a/test/libapt/parsedepends_test.cc
+++ b/test/libapt/parsedepends_test.cc
@@ -1,11 +1,11 @@
#include <config.h>
-#include <apt-pkg/deblistparser.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/deblistparser.h>
#include <apt-pkg/pkgcache.h>
-#include <string.h>
#include <string>
+#include <string.h>
#include <gtest/gtest.h>
diff --git a/test/libapt/priority_test.cc b/test/libapt/priority_test.cc
index ef1941ce5..af7932ae8 100644
--- a/test/libapt/priority_test.cc
+++ b/test/libapt/priority_test.cc
@@ -1,7 +1,7 @@
#include <config.h>
#include <apt-pkg/pkgcache.h>
-#include <string>
#include <gtest/gtest.h>
+#include <string>
using std::string;
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 83c441092..6182639a4 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -1,7 +1,7 @@
#include <config.h>
-#include <apt-pkg/sourcelist.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/sourcelist.h>
#include <string>
#include <stdlib.h>
diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc
index d7700bd54..9c192a58b 100644
--- a/test/libapt/strutil_test.cc
+++ b/test/libapt/strutil_test.cc
@@ -1,6 +1,6 @@
#include <config.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
#include <string>
#include <vector>
diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc
index 24fbd389e..fb85ebcad 100644
--- a/test/libapt/tagfile_test.cc
+++ b/test/libapt/tagfile_test.cc
@@ -3,11 +3,11 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/tagfile.h>
+#include <sstream>
#include <string>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sstream>
#include <gtest/gtest.h>
diff --git a/test/libapt/tagsection_test.cc b/test/libapt/tagsection_test.cc
index 779932595..d79b1b63d 100644
--- a/test/libapt/tagsection_test.cc
+++ b/test/libapt/tagsection_test.cc
@@ -3,8 +3,8 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/tagfile.h>
-#include <string>
#include <sstream>
+#include <string>
#include <gtest/gtest.h>
diff --git a/test/libapt/teestream_test.cc b/test/libapt/teestream_test.cc
index 18610b24d..a897e08ec 100644
--- a/test/libapt/teestream_test.cc
+++ b/test/libapt/teestream_test.cc
@@ -1,9 +1,9 @@
#include <config.h>
-#include <string>
-#include <sstream>
-#include <fstream>
#include "../interactive-helper/teestream.h"
+#include <fstream>
+#include <sstream>
+#include <string>
#include <gtest/gtest.h>
diff --git a/test/libapt/uri_test.cc b/test/libapt/uri_test.cc
index 09d018049..54f4f84f8 100644
--- a/test/libapt/uri_test.cc
+++ b/test/libapt/uri_test.cc
@@ -2,8 +2,8 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/proxy.h>
#include <apt-pkg/strutl.h>
-#include <string>
#include <gtest/gtest.h>
+#include <string>
TEST(URITest, BasicHTTP)
{