summaryrefslogtreecommitdiff
path: root/gdb/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/unittests')
-rw-r--r--gdb/unittests/array-view-selftests.c8
-rw-r--r--gdb/unittests/child-path-selftests.c2
-rw-r--r--gdb/unittests/cli-utils-selftests.c2
-rw-r--r--gdb/unittests/common-utils-selftests.c3
-rw-r--r--gdb/unittests/copy_bitwise-selftests.c4
-rw-r--r--gdb/unittests/environ-selftests.c8
-rw-r--r--gdb/unittests/format_pieces-selftests.c2
-rw-r--r--gdb/unittests/function-view-selftests.c4
-rw-r--r--gdb/unittests/lookup_name_info-selftests.c4
-rw-r--r--gdb/unittests/memory-map-selftests.c4
-rw-r--r--gdb/unittests/memrange-selftests.c4
-rw-r--r--gdb/unittests/mkdir-recursive-selftests.c5
-rw-r--r--gdb/unittests/observable-selftests.c4
-rw-r--r--gdb/unittests/offset-type-selftests.c4
-rw-r--r--gdb/unittests/optional-selftests.c4
-rw-r--r--gdb/unittests/parse-connection-spec-selftests.c9
-rw-r--r--gdb/unittests/ptid-selftests.c6
-rw-r--r--gdb/unittests/rsp-low-selftests.c4
-rw-r--r--gdb/unittests/scoped_fd-selftests.c5
-rw-r--r--gdb/unittests/scoped_mmap-selftests.c5
-rw-r--r--gdb/unittests/scoped_restore-selftests.c4
-rw-r--r--gdb/unittests/style-selftests.c4
-rw-r--r--gdb/unittests/tracepoint-selftests.c4
-rw-r--r--gdb/unittests/unpack-selftests.c8
-rw-r--r--gdb/unittests/utils-selftests.c6
-rw-r--r--gdb/unittests/xml-utils-selftests.c4
26 files changed, 100 insertions, 21 deletions
diff --git a/gdb/unittests/array-view-selftests.c b/gdb/unittests/array-view-selftests.c
index d0d1128cd2a..d4acb419cea 100644
--- a/gdb/unittests/array-view-selftests.c
+++ b/gdb/unittests/array-view-selftests.c
@@ -18,10 +18,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
-#include "common/array-view.h"
+
+/* Standard C++ includes. */
#include <array>
+/* Local subdirectory includes. */
+#include "common/array-view.h"
+#include "common/selftest.h"
+
namespace selftests {
namespace array_view_tests {
diff --git a/gdb/unittests/child-path-selftests.c b/gdb/unittests/child-path-selftests.c
index 4c436efa969..7de12e7d300 100644
--- a/gdb/unittests/child-path-selftests.c
+++ b/gdb/unittests/child-path-selftests.c
@@ -18,6 +18,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/pathstuff.h"
#include "common/selftest.h"
diff --git a/gdb/unittests/cli-utils-selftests.c b/gdb/unittests/cli-utils-selftests.c
index dd4a7a0f0f9..f7f30ae5a90 100644
--- a/gdb/unittests/cli-utils-selftests.c
+++ b/gdb/unittests/cli-utils-selftests.c
@@ -18,6 +18,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "cli/cli-utils.h"
#include "common/selftest.h"
diff --git a/gdb/unittests/common-utils-selftests.c b/gdb/unittests/common-utils-selftests.c
index 996ab5e82d1..01416a6f8f0 100644
--- a/gdb/unittests/common-utils-selftests.c
+++ b/gdb/unittests/common-utils-selftests.c
@@ -17,6 +17,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/common-defs.h"
#include "common/selftest.h"
diff --git a/gdb/unittests/copy_bitwise-selftests.c b/gdb/unittests/copy_bitwise-selftests.c
index 9dd9aeac00c..ee0d60f6128 100644
--- a/gdb/unittests/copy_bitwise-selftests.c
+++ b/gdb/unittests/copy_bitwise-selftests.c
@@ -18,7 +18,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+
+/* Local includes. */
#include "utils.h"
namespace selftests {
diff --git a/gdb/unittests/environ-selftests.c b/gdb/unittests/environ-selftests.c
index 2bbff7039e6..1aeda9d9340 100644
--- a/gdb/unittests/environ-selftests.c
+++ b/gdb/unittests/environ-selftests.c
@@ -18,10 +18,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
-#include "common/environ.h"
+
+/* Local non-gdb includes. */
#include "diagnostics.h"
+/* Local subdirectory includes. */
+#include "common/environ.h"
+#include "common/selftest.h"
+
static const char gdb_selftest_env_var[] = "GDB_SELFTEST_ENVIRON";
static bool
diff --git a/gdb/unittests/format_pieces-selftests.c b/gdb/unittests/format_pieces-selftests.c
index 976af3d2fcd..b62644759c2 100644
--- a/gdb/unittests/format_pieces-selftests.c
+++ b/gdb/unittests/format_pieces-selftests.c
@@ -18,6 +18,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/format.h"
#include "common/selftest.h"
diff --git a/gdb/unittests/function-view-selftests.c b/gdb/unittests/function-view-selftests.c
index 2abaa1f9917..f5355ce2931 100644
--- a/gdb/unittests/function-view-selftests.c
+++ b/gdb/unittests/function-view-selftests.c
@@ -18,8 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
+
+/* Local subdirectory includes. */
#include "common/function-view.h"
+#include "common/selftest.h"
namespace selftests {
namespace function_view {
diff --git a/gdb/unittests/lookup_name_info-selftests.c b/gdb/unittests/lookup_name_info-selftests.c
index 04fcd7e0b5a..f1746653c18 100644
--- a/gdb/unittests/lookup_name_info-selftests.c
+++ b/gdb/unittests/lookup_name_info-selftests.c
@@ -18,7 +18,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+
+/* Local includes. */
#include "symtab.h"
namespace selftests {
diff --git a/gdb/unittests/memory-map-selftests.c b/gdb/unittests/memory-map-selftests.c
index fc6f0fe5730..88e277532d6 100644
--- a/gdb/unittests/memory-map-selftests.c
+++ b/gdb/unittests/memory-map-selftests.c
@@ -18,7 +18,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+
+/* Local includes. */
#include "memory-map.h"
#if defined(HAVE_LIBEXPAT)
diff --git a/gdb/unittests/memrange-selftests.c b/gdb/unittests/memrange-selftests.c
index ada8e3e4342..0a39b49e7b7 100644
--- a/gdb/unittests/memrange-selftests.c
+++ b/gdb/unittests/memrange-selftests.c
@@ -18,7 +18,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+
+/* Local includes. */
#include "memrange.h"
namespace selftests {
diff --git a/gdb/unittests/mkdir-recursive-selftests.c b/gdb/unittests/mkdir-recursive-selftests.c
index a8b571f38c7..1a19805fa95 100644
--- a/gdb/unittests/mkdir-recursive-selftests.c
+++ b/gdb/unittests/mkdir-recursive-selftests.c
@@ -19,10 +19,11 @@
#include "defs.h"
-#include "common/filestuff.h"
-#include "common/selftest.h"
+/* Local subdirectory includes. */
#include "common/byte-vector.h"
+#include "common/filestuff.h"
#include "common/pathstuff.h"
+#include "common/selftest.h"
namespace selftests {
namespace mkdir_recursive {
diff --git a/gdb/unittests/observable-selftests.c b/gdb/unittests/observable-selftests.c
index 2a51a999561..55ececaa6fa 100644
--- a/gdb/unittests/observable-selftests.c
+++ b/gdb/unittests/observable-selftests.c
@@ -18,8 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
+
+/* Local subdirectory includes. */
#include "common/observable.h"
+#include "common/selftest.h"
namespace selftests {
namespace observers {
diff --git a/gdb/unittests/offset-type-selftests.c b/gdb/unittests/offset-type-selftests.c
index 8222a94ad02..0f04d41d563 100644
--- a/gdb/unittests/offset-type-selftests.c
+++ b/gdb/unittests/offset-type-selftests.c
@@ -18,8 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
+
+/* Local subdirectory includes. */
#include "common/offset-type.h"
+#include "common/selftest.h"
#include "common/underlying.h"
#include "common/valid-expr.h"
diff --git a/gdb/unittests/optional-selftests.c b/gdb/unittests/optional-selftests.c
index fdd4437b16e..ca2e2432f57 100644
--- a/gdb/unittests/optional-selftests.c
+++ b/gdb/unittests/optional-selftests.c
@@ -18,8 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
+
+/* Local subdirectory includes. */
#include "common/gdb_optional.h"
+#include "common/selftest.h"
/* Used by the included .cc files below. Included here because the
included test files are wrapped in a namespace. */
diff --git a/gdb/unittests/parse-connection-spec-selftests.c b/gdb/unittests/parse-connection-spec-selftests.c
index 969c51e4e88..7e451c8b70e 100644
--- a/gdb/unittests/parse-connection-spec-selftests.c
+++ b/gdb/unittests/parse-connection-spec-selftests.c
@@ -18,9 +18,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
-#include "common/netstuff.h"
+
+/* Local non-gdb includes. */
#include "diagnostics.h"
+
+/* Local subdirectory includes. */
+#include "common/netstuff.h"
+#include "common/selftest.h"
+
#ifdef USE_WIN32API
#if _WIN32_WINNT < 0x0501
# undef _WIN32_WINNT
diff --git a/gdb/unittests/ptid-selftests.c b/gdb/unittests/ptid-selftests.c
index 0194d9a229f..cc43ee96511 100644
--- a/gdb/unittests/ptid-selftests.c
+++ b/gdb/unittests/ptid-selftests.c
@@ -18,9 +18,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/ptid.h"
+
+/* Standard C++ includes. */
#include <type_traits>
+/* Local subdirectory includes. */
+#include "common/ptid.h"
+
namespace selftests {
namespace ptid {
diff --git a/gdb/unittests/rsp-low-selftests.c b/gdb/unittests/rsp-low-selftests.c
index dc3e8f52054..d3594b46c48 100644
--- a/gdb/unittests/rsp-low-selftests.c
+++ b/gdb/unittests/rsp-low-selftests.c
@@ -18,8 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
+
+/* Local subdirectory includes. */
#include "common/rsp-low.h"
+#include "common/selftest.h"
namespace selftests {
namespace rsp_low {
diff --git a/gdb/unittests/scoped_fd-selftests.c b/gdb/unittests/scoped_fd-selftests.c
index 886ff261acb..1089c1efd9c 100644
--- a/gdb/unittests/scoped_fd-selftests.c
+++ b/gdb/unittests/scoped_fd-selftests.c
@@ -19,9 +19,12 @@
#include "defs.h"
+/* Local non-gdb includes. */
+#include "config.h"
+
+/* Local subdirectory includes. */
#include "common/filestuff.h"
#include "common/scoped_fd.h"
-#include "config.h"
#include "common/selftest.h"
namespace selftests {
diff --git a/gdb/unittests/scoped_mmap-selftests.c b/gdb/unittests/scoped_mmap-selftests.c
index a3d2040b62a..9da476b0b25 100644
--- a/gdb/unittests/scoped_mmap-selftests.c
+++ b/gdb/unittests/scoped_mmap-selftests.c
@@ -19,9 +19,12 @@
#include "defs.h"
+/* Local non-gdb includes. */
+#include "config.h"
+
+/* Local subdirectory includes. */
#include "common/filestuff.h"
#include "common/scoped_mmap.h"
-#include "config.h"
#if defined(HAVE_SYS_MMAN_H)
diff --git a/gdb/unittests/scoped_restore-selftests.c b/gdb/unittests/scoped_restore-selftests.c
index 564ca07a920..5a38dc24840 100644
--- a/gdb/unittests/scoped_restore-selftests.c
+++ b/gdb/unittests/scoped_restore-selftests.c
@@ -18,8 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/selftest.h"
+
+/* Local subdirectory includes. */
#include "common/scoped_restore.h"
+#include "common/selftest.h"
namespace selftests {
namespace scoped_restore_tests {
diff --git a/gdb/unittests/style-selftests.c b/gdb/unittests/style-selftests.c
index 9682724b86f..bcf6885aac4 100644
--- a/gdb/unittests/style-selftests.c
+++ b/gdb/unittests/style-selftests.c
@@ -18,7 +18,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+
+/* Local includes. */
#include "ui-style.h"
namespace selftests {
diff --git a/gdb/unittests/tracepoint-selftests.c b/gdb/unittests/tracepoint-selftests.c
index 1e2618453b4..39cd0f9eec1 100644
--- a/gdb/unittests/tracepoint-selftests.c
+++ b/gdb/unittests/tracepoint-selftests.c
@@ -18,7 +18,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+
+/* Local includes. */
#include "tracepoint.h"
namespace selftests {
diff --git a/gdb/unittests/unpack-selftests.c b/gdb/unittests/unpack-selftests.c
index e85aa2180b7..be5f595e7a8 100644
--- a/gdb/unittests/unpack-selftests.c
+++ b/gdb/unittests/unpack-selftests.c
@@ -18,11 +18,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+
+/* Local includes. */
+#include "arch-utils.h"
+#include "gdbtypes.h"
#include "selftest-arch.h"
#include "value.h"
-#include "gdbtypes.h"
-#include "arch-utils.h"
namespace selftests {
namespace unpack {
diff --git a/gdb/unittests/utils-selftests.c b/gdb/unittests/utils-selftests.c
index c874de3e181..da79b2652d7 100644
--- a/gdb/unittests/utils-selftests.c
+++ b/gdb/unittests/utils-selftests.c
@@ -18,9 +18,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "utils.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+/* Local includes. */
+#include "utils.h"
+
namespace selftests {
namespace utils {
diff --git a/gdb/unittests/xml-utils-selftests.c b/gdb/unittests/xml-utils-selftests.c
index 2c24056aacd..fd5b17f4839 100644
--- a/gdb/unittests/xml-utils-selftests.c
+++ b/gdb/unittests/xml-utils-selftests.c
@@ -18,8 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/xml-utils.h"
+
+/* Local subdirectory includes. */
#include "common/selftest.h"
+#include "common/xml-utils.h"
namespace selftests {
namespace xml_utils {