aboutsummaryrefslogtreecommitdiff
path: root/gdb/unittests/gdb_tilde_expand-selftests.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:36:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:46:02 -0500
commitc583a2520616c2736cffc389c89a48b159366e6c (patch)
treeb4925f26506fcee96c16119431c01760f05db95d /gdb/unittests/gdb_tilde_expand-selftests.c
parentca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff)
downloadgdb-users/simark/clang-format.zip
gdb-users/simark/clang-format.tar.gz
gdb-users/simark/clang-format.tar.bz2
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/unittests/gdb_tilde_expand-selftests.c')
-rw-r--r--gdb/unittests/gdb_tilde_expand-selftests.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gdb/unittests/gdb_tilde_expand-selftests.c b/gdb/unittests/gdb_tilde_expand-selftests.c
index 3de67c3..1bba9a7 100644
--- a/gdb/unittests/gdb_tilde_expand-selftests.c
+++ b/gdb/unittests/gdb_tilde_expand-selftests.c
@@ -23,8 +23,10 @@
#include "gdbsupport/gdb_tilde_expand.h"
-namespace selftests {
-namespace gdb_tilde_expand_tests {
+namespace selftests
+{
+namespace gdb_tilde_expand_tests
+{
static void
do_test ()
@@ -45,7 +47,7 @@ do_test ()
does not exist, gdb_tilde expand must still be able to do the tilde
expansion. */
SELF_CHECK (gdb_tilde_expand ("~/non/existent/directory")
- == home + "/non/existent/directory");
+ == home + "/non/existent/directory");
/* gdb_tilde_expand only expands tilde and does not try to do any other
substitution. */
@@ -63,7 +65,7 @@ do_test ()
const std::string user (c_user);
SELF_CHECK (gdb_tilde_expand (("~" + user).c_str ()) == home);
SELF_CHECK (gdb_tilde_expand (("~" + user + "/a/b").c_str ())
- == home + "/a/b");
+ == home + "/a/b");
}
/* Check that an error is thrown when trying to expand home of a unknown
@@ -76,9 +78,9 @@ do_test ()
catch (const gdb_exception_error &e)
{
SELF_CHECK (e.error == GENERIC_ERROR);
- SELF_CHECK
- (*e.message
- == "Could not find a match for '~no_one_should_have_that_login'.");
+ SELF_CHECK (
+ *e.message
+ == "Could not find a match for '~no_one_should_have_that_login'.");
}
}
@@ -86,9 +88,10 @@ do_test ()
} /* namespace selftests */
void _initialize_gdb_tilde_expand_selftests ();
+
void
_initialize_gdb_tilde_expand_selftests ()
{
- selftests::register_test
- ("gdb_tilde_expand", selftests::gdb_tilde_expand_tests::do_test);
+ selftests::register_test ("gdb_tilde_expand",
+ selftests::gdb_tilde_expand_tests::do_test);
}