public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test
@ 2023-01-12 19:08 Andrew Burgess
  2023-01-12 19:08 ` [PATCH 1/2] gdb/testsuite: use test_gdb_complete_unique more in C++ tests Andrew Burgess
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Burgess @ 2023-01-12 19:08 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

Some minor cleanups / improvements for the gdb.cp/cpcompletion.exp
test script.

Thoughts?

Thanks,
Andrew

---

Andrew Burgess (2):
  gdb/testsuite: use test_gdb_complete_unique more in C++ tests
  gdb/testsuite: rename test source file to match test script

 gdb/testsuite/gdb.cp/{pr9594.cc => cpcompletion.cc} |  0
 gdb/testsuite/gdb.cp/cpcompletion.exp               | 10 +++++-----
 2 files changed, 5 insertions(+), 5 deletions(-)
 rename gdb/testsuite/gdb.cp/{pr9594.cc => cpcompletion.cc} (100%)


base-commit: 1a26a53a0dee39106ba58fcb15496c5f13074652
-- 
2.25.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] gdb/testsuite: use test_gdb_complete_unique more in C++ tests
  2023-01-12 19:08 [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test Andrew Burgess
@ 2023-01-12 19:08 ` Andrew Burgess
  2023-01-12 19:08 ` [PATCH 2/2] gdb/testsuite: rename test source file to match test script Andrew Burgess
  2023-01-25 10:13 ` [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test Andrew Burgess
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Burgess @ 2023-01-12 19:08 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

Spotted in gdb.cp/cpcompletion.exp that we could replace some uses of
gdb_test with test_gdb_complete_unique, this will extend the
completion testing to check tab-completion as well as completion using
the 'complete' command in some additional cases.
---
 gdb/testsuite/gdb.cp/cpcompletion.exp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp
index 931f376a23d..371e90cca7d 100644
--- a/gdb/testsuite/gdb.cp/cpcompletion.exp
+++ b/gdb/testsuite/gdb.cp/cpcompletion.exp
@@ -85,16 +85,16 @@ if {![runto "${srcfile}:$bp_location"]} {
 
 # This also tests inheritance -- completion should only see a single
 # "get_foo".
-gdb_test "complete p foo1.g" "p foo1\\.get_foo"
+test_gdb_complete_unique "p foo1.g" "p foo1.get_foo"
 
 # Test inheritance without overriding.
-gdb_test "complete p foo1.base" "p foo1\\.base_function_only"
+test_gdb_complete_unique "p foo1.base" "p foo1.base_function_only"
 
 # Test non-completion of constructor names.
-gdb_test "complete p foo1.Fo" "p foo1\\.Foofoo"
+test_gdb_complete_unique "p foo1.Fo" "p foo1.Foofoo"
 
 # Test completion with an anonymous struct.
-gdb_test "complete p a.g" "p a\\.get"
+test_gdb_complete_unique "p a.g" "p a.get"
 
 with_test_prefix "expression with namespace" {
     # Before the scope operator, GDB shows all the symbols whose
-- 
2.25.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] gdb/testsuite: rename test source file to match test script
  2023-01-12 19:08 [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test Andrew Burgess
  2023-01-12 19:08 ` [PATCH 1/2] gdb/testsuite: use test_gdb_complete_unique more in C++ tests Andrew Burgess
@ 2023-01-12 19:08 ` Andrew Burgess
  2023-01-25 10:13 ` [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test Andrew Burgess
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Burgess @ 2023-01-12 19:08 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

The previous commit touched the source file for the test script
gdb.cp/cpcompletion.exp.  This source file is called pr9594.cc.  The
source file is only used by the one test script.

This commit renames the source file cpcompletion.cc to match the test
script, this is more inline with how we name source files these days.
---
 gdb/testsuite/gdb.cp/{pr9594.cc => cpcompletion.cc} | 0
 gdb/testsuite/gdb.cp/cpcompletion.exp               | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename gdb/testsuite/gdb.cp/{pr9594.cc => cpcompletion.cc} (100%)

diff --git a/gdb/testsuite/gdb.cp/pr9594.cc b/gdb/testsuite/gdb.cp/cpcompletion.cc
similarity index 100%
rename from gdb/testsuite/gdb.cp/pr9594.cc
rename to gdb/testsuite/gdb.cp/cpcompletion.cc
diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp
index 371e90cca7d..a3b09239f30 100644
--- a/gdb/testsuite/gdb.cp/cpcompletion.exp
+++ b/gdb/testsuite/gdb.cp/cpcompletion.exp
@@ -53,7 +53,7 @@ proc test_class_complete {class expr name matches} {
 
 if { [skip_cplus_tests] } { continue }
 
-standard_testfile pr9594.cc
+standard_testfile .cc
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
-- 
2.25.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test
  2023-01-12 19:08 [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test Andrew Burgess
  2023-01-12 19:08 ` [PATCH 1/2] gdb/testsuite: use test_gdb_complete_unique more in C++ tests Andrew Burgess
  2023-01-12 19:08 ` [PATCH 2/2] gdb/testsuite: rename test source file to match test script Andrew Burgess
@ 2023-01-25 10:13 ` Andrew Burgess
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Burgess @ 2023-01-25 10:13 UTC (permalink / raw)
  To: gdb-patches

Andrew Burgess <aburgess@redhat.com> writes:

> Some minor cleanups / improvements for the gdb.cp/cpcompletion.exp
> test script.

I went ahead and pushed these changes.

Thanks,
Andrew


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-25 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 19:08 [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test Andrew Burgess
2023-01-12 19:08 ` [PATCH 1/2] gdb/testsuite: use test_gdb_complete_unique more in C++ tests Andrew Burgess
2023-01-12 19:08 ` [PATCH 2/2] gdb/testsuite: rename test source file to match test script Andrew Burgess
2023-01-25 10:13 ` [PATCH 0/2] Cleanup the gdb.cp/cpcompletion.exp test Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).