]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.cp/inherit.exp
Fix some duplicate test names
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cp / inherit.exp
index d269a3bd489ddf15682daf85eda2e68fb2cc0932..59c72da6ae8645a4b50afd23b2f9e52d7491be6d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright 1992-2020 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ load_lib "cp-support.exp"
 
 standard_testfile misc.cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -420,9 +420,6 @@ proc test_print_mi_classes { } {
 # incapable of printing the member of an anonymous union.
 # We test the printing of the member first, and perform the other tests
 # only if the test succeeds, to avoid the infinite loop.
-#
-# GDB HEAD 2004-01-27 with hp aCC A.03.45 crashes on the first test.
-# -- chastain 2004-01-27
 
 proc test_print_anon_union {} {
     global gdb_prompt
@@ -482,9 +479,9 @@ proc test_print_svi_members { } {
     gdb_test "print g_vC.vC::vx" "$vhn = 10"
 
     # Print members of g_vC using compact form.
-    gdb_test "print g_vC.va" "$vhn = 7" "print g_vC.va"
-    gdb_test "print g_vC.vc" "$vhn = 9" "print g_vC.vc"
-    gdb_test "print g_vC.vx" "$vhn = 10" "print g_vC.vx"
+    gdb_test "print g_vC.va" "$vhn = 7"
+    gdb_test "print g_vC.vc" "$vhn = 9"
+    gdb_test "print g_vC.vx" "$vhn = 10"
 }
 
 # Single virtual inheritance, print complete classes.
@@ -527,7 +524,7 @@ proc test_print_svi_classes { } {
        -re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_3 = ${hex}( <\[^>]*>)?, vb = 5, vx = 6\}$nl$gdb_prompt $" {
            # gcc HEAD 2015?+
            # the vptr is set to the address *after* the vtable,
-           # so the # symbol shown is unpredictable
+           # so the # symbol shown is unpredictable.
            pass "$name (symbols ignored)"
        }
     }
@@ -561,7 +558,7 @@ proc test_print_svi_classes { } {
        -re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_3 = ${hex}( <\[^>]*>)?, vc = 9, vx = 10\}$nl$gdb_prompt $" {
            # gcc HEAD 2015?+
            # the vptr is set to the address *after* the vtable,
-           # so the symbol shown is unpredictable
+           # so the symbol shown is unpredictable.
            pass "$name (symbols ignored)"
        }
     }
@@ -638,7 +635,7 @@ proc test_print_mvi_classes { } {
        -re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_3_vB = ${hex}( <\[^>]*>)?, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_3_vC = ${hex}( <\[^>]*>)?, vc = 23, vx = 24\}, $re_vbptr_3_vD = ${hex}( <\[^>]*>)?, vd = 25, vx = 26\}$nl$gdb_prompt $" {
            # gcc HEAD 2015?+
            # the vptr is set to the address *after* the vtable,
-           # so the symbol shown is unpredictable
+           # so the symbol shown is unpredictable.
            pass "$name (symbols ignored)"
        }
     }
@@ -671,7 +668,7 @@ proc test_print_mvi_classes { } {
        -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = ${hex}( <\[^>]*>)?, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = ${hex}( <\[^>]*>)?, vc = 0, vx = 0\}, $re_vbptr_3_vD = ${hex}( <\[^>]*>)?, vd = 0, vx = 0\}, $re_vbptr_3_vE = ${hex}( <\[^>]*>)?, ve = 27, vx = 28\}$nl$gdb_prompt $" {
            # gcc HEAD 2015?+
            # the vptr is set to the address *after* the vtable,
-           # so the symbol shown is unpredictable
+           # so the symbol shown is unpredictable.
            pass "$name (symbols ignored)"
        }
     }
@@ -696,9 +693,16 @@ proc do_tests { } {
        return
     }
 
-    test_print_si_members
+    with_test_prefix "single inheritance" {
+       test_print_si_members
+    }
+
     test_print_si_classes
-    test_print_mi_members
+
+    with_test_prefix "multiple inheritance" {
+       test_print_mi_members
+    }
+
     test_print_mi_member_types
     test_print_mi_classes
     test_print_anon_union