aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/derivation.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.cp/derivation.exp')
-rw-r--r--gdb/testsuite/gdb.cp/derivation.exp14
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp
index 287a830..66a3a3b 100644
--- a/gdb/testsuite/gdb.cp/derivation.exp
+++ b/gdb/testsuite/gdb.cp/derivation.exp
@@ -32,14 +32,15 @@ if { [skip_cplus_tests] } { continue }
load_lib "cp-support.exp"
-standard_testfile .cc
+standard_testfile derivation.cc derivation2.cc
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing $testfile.exp $testfile \
+ [list $srcfile $srcfile2] {debug c++}]} {
return -1
}
# Check inheritance of typedefs.
-foreach klass {"A" "D" "E" "F"} {
+foreach klass {"A" "D" "E" "F" "A2" "D2"} {
gdb_test "ptype ${klass}::value_type" "type = int"
gdb_test "whatis ${klass}::value_type" "type = int"
gdb_test "p (${klass}::value_type) 0" " = 0"
@@ -57,6 +58,13 @@ if ![runto 'marker1'] then {
continue
}
+# Check inheritance of typedefs again, but this time with an active block.
+foreach klass {"A" "D" "A2" "D2"} {
+ gdb_test "ptype ${klass}::value_type" "type = int"
+ gdb_test "whatis ${klass}::value_type" "type = int"
+ gdb_test "p (${klass}::value_type) 0" " = 0"
+}
+
gdb_test "up" ".*main.*" "up from marker1"
# Print class types and values.