diff options
author | Doug Evans <dje@google.com> | 2013-06-06 19:02:27 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-06-06 19:02:27 +0000 |
commit | c6cf1712fb960f2db2dba0a4033f3b80c28ef35d (patch) | |
tree | f3ee0bbaae8c9432a6b2f3b363dcea0f6914d108 /gdb/testsuite/gdb.cp | |
parent | bf6be0f482c67d805e3b67aa424e4f5b0126bcfd (diff) | |
download | gdb-c6cf1712fb960f2db2dba0a4033f3b80c28ef35d.zip gdb-c6cf1712fb960f2db2dba0a4033f3b80c28ef35d.tar.gz gdb-c6cf1712fb960f2db2dba0a4033f3b80c28ef35d.tar.bz2 |
* gdb.cp/derivation.exp: Make tests have unique names.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/derivation.exp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp index 66a3a3b..8521239 100644 --- a/gdb/testsuite/gdb.cp/derivation.exp +++ b/gdb/testsuite/gdb.cp/derivation.exp @@ -40,15 +40,17 @@ if {[prepare_for_testing $testfile.exp $testfile \ } # Check inheritance of typedefs. -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" -} -foreach klass {"Z" "ZZ"} { - gdb_test "ptype ${klass}::value_type" "type = float" - gdb_test "whatis ${klass}::value_type" "type = float" - gdb_test "p (${klass}::value_type) 0" " = 0" +with_test_prefix "before run" { + 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" + } + foreach klass {"Z" "ZZ"} { + gdb_test "ptype ${klass}::value_type" "type = float" + gdb_test "whatis ${klass}::value_type" "type = float" + gdb_test "p (${klass}::value_type) 0" " = 0" + } } # Set it up at a breakpoint so we can play with the variable values. @@ -59,10 +61,12 @@ if ![runto 'marker1'] then { } # 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" +with_test_prefix "at marker1" { + 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" |