[committed,testsuite] Reapply fix for gdb.cp/var-tag.exp C++ failures
Commit Message
On 07/30/2015 02:56 PM, Keith Seitz wrote:
> On 07/30/2015 12:02 PM, Sandra Loosemore wrote:
>
>> diff --git a/gdb/testsuite/gdb.cp/var-tag.exp b/gdb/testsuite/gdb.cp/var-tag.exp
>> index 30aab99..60379e9 100644
>> --- a/gdb/testsuite/gdb.cp/var-tag.exp
>> +++ b/gdb/testsuite/gdb.cp/var-tag.exp
>> @@ -28,13 +28,18 @@ if {[prepare_for_testing $testfile.exp $testfile \
>>
>> proc do_global_tests {lang} {
>> set invalid_print "Attempt to use a type name as an expression"
>> - set ptypefmt "type = (class|enum|union|struct) %s {.*}"
>> +
>> + if {$lang == "c++"} {
>> + set opt_underlying "(: unsigned int )?"
>> + } else {
>> + set opt_underlying ""
>
> Missing '}' ?
Oh, argh. I had fixed this in the local GIT branch I'm using for
testing, and then applied the wrong version of the patch to the master
branch to check in. Here is the correct patch; I hope I've fixed this
up correctly on master now.
-Sandra
Comments
On 07/30/2015 02:24 PM, Sandra Loosemore wrote:
> Oh, argh. I had fixed this in the local GIT branch I'm using for
> testing, and then applied the wrong version of the patch to the master
> branch to check in. Here is the correct patch; I hope I've fixed this
> up correctly on master now.
Everything looks good.
/me happy it wasn't him this time! :-)
Keith
@@ -28,13 +28,19 @@ if {[prepare_for_testing $testfile.exp $testfile \
proc do_global_tests {lang} {
set invalid_print "Attempt to use a type name as an expression"
- set ptypefmt "type = (class|enum|union|struct) %s {.*}"
+
+ if {$lang == "c++"} {
+ set opt_underlying "(: unsigned int )?"
+ } else {
+ set opt_underlying ""
+ }
+ set ptypefmt "type = (class|enum|union|struct) %s $opt_underlying{.*}"
with_test_prefix $lang {
gdb_test_no_output "set language $lang"
gdb_test "ptype C" "type = class C {.*}"
gdb_test "print E" "= a"
- gdb_test "ptype E" "type = enum E {.*}"
+ gdb_test "ptype E" "type = enum E $opt_underlying{.*}"
gdb_test "print S" "= {<No data fields>}"
gdb_test "ptype S" "type = struct S {.*}"
gdb_test "print U" "= {.*}"
@@ -48,7 +54,7 @@ proc do_global_tests {lang} {
gdb_test "print SS" [format $invalid_print "SS"]
gdb_test "ptype SS" [format $ptypefmt "SS"]
gdb_test "print ee" "= .*"
- gdb_test "ptype ee" "type = enum EE {.*}"
+ gdb_test "ptype ee" "type = enum EE $opt_underlying{.*}"
gdb_test "print EE" [format $invalid_print "EE"]
gdb_test "ptype EE" [format $ptypefmt "EE"]
gdb_test "print uu" "= {.*}"
@@ -60,7 +66,7 @@ proc do_global_tests {lang} {
# Each of them is in a separate CU as once its CU is expanded,
# we're no longer using the quick fns API.
gdb_test "print E2" "= a2"
- gdb_test "ptype E2" "type = enum E2 {.*}"
+ gdb_test "ptype E2" "type = enum E2 $opt_underlying{.*}"
gdb_test "print S2" "= {<No data fields>}"
gdb_test "ptype S2" "type = struct S2 {.*}"
gdb_test "print U2" "= {.*}"