[review] gdb/testsuite: do minor clean-up in gdb.cp/rvalue-ref-overload.exp

Message ID gerrit.1573572186000.Ie760a2856cae3be0eeed5496765a5f1cd102d6b7@gnutoolchain-gerrit.osci.io
State New, archived
Headers

Commit Message

Simon Marchi (Code Review) Nov. 12, 2019, 3:23 p.m. UTC
  Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/618
......................................................................

gdb/testsuite: do minor clean-up in gdb.cp/rvalue-ref-overload.exp

Simplify the expected test outputs.  This is a minor cleanup; no
functional change is intended.

gdb/testsuite/ChangeLog:
2019-11-12  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* gdb.cp/rvalue-ref-overload.exp: Minor cleanup.

Change-Id: Ie760a2856cae3be0eeed5496765a5f1cd102d6b7
---
M gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
1 file changed, 5 insertions(+), 9 deletions(-)
  

Comments

Simon Marchi (Code Review) Dec. 5, 2019, 8:14 p.m. UTC | #1
Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/618
......................................................................


Patch Set 1: Code-Review+2

Thank you.  This is ok.
  

Patch

diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
index 693c7ca..e92e901 100644
--- a/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
+++ b/gdb/testsuite/gdb.cp/rvalue-ref-overload.exp
@@ -53,20 +53,16 @@ 
 	{ method public "int overloadConst(const foo &&);" }
     }
 
-gdb_test "print foo_rr_instance1.overload1arg(arg)" \
-    "\\$\[0-9\]+ = 1" \
-    "print call overloaded func foo & arg"
+gdb_test "print foo_rr_instance1.overload1arg(arg)" "1"
 
-gdb_test "print foo_rr_instance1.overload1arg(static_cast<foo&&>(arg))" \
-    "\\$\[0-9\]+ = 2" \
-    "print call overloaded func foo && arg"
+gdb_test "print foo_rr_instance1.overload1arg(static_cast<foo&&>(arg))" "2"
 
 gdb_test "print foo_rr_instance1.overloadConst(arg)" "3"
 
 # Test lvalue vs rvalue function overloads
-gdb_test "print f (i)" "= 1" "lvalue reference overload"
+gdb_test "print f (i)" "1" "lvalue reference overload"
 
-gdb_test "print f (ci)" "= 2" "lvalue reference to const overload"
+gdb_test "print f (ci)" "2" "lvalue reference to const overload"
 
 setup_kfail "c++/15372" "*-*-*"
-gdb_test "print f (3)" "= 3" "rvalue reference overload"
+gdb_test "print f (3)" "3" "rvalue reference overload"