]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.python/py-typeprint.exp
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.python / py-typeprint.exp
CommitLineData
8acc9f48 1# Copyright (C) 2012-2013 Free Software Foundation, Inc.
18a9fc12
TT
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16if { [skip_cplus_tests] } { continue }
17
18load_lib gdb-python.exp
19load_lib cp-support.exp
20
21standard_testfile .cc
22
23if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
24 return -1
25}
26
27if { [skip_python_tests] } { continue }
28
29set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
30
2960a434 31gdb_test_no_output "python exec (open ('${remote_python_file}').read ())"
18a9fc12
TT
32
33cp_test_ptype_class s "basic test" "class" "templ<string>" {
34 { field public "T x;" }
35 { field public "templ<T> *value;" }
36} "" {} ""
37
38cp_test_ptype_class s "raw test" "class" "templ<basic_string>" {
39 { field public "basic_string x;" }
40 { field public "templ<basic_string> *value;" }
41} "" {} "/r"
42
43gdb_test_no_output "disable type-printer string"
44gdb_test "whatis bs" "basic_string" "whatis with disabled printer"
45
46gdb_test "info type-printers" "Global type printers:.*string.*disabled.*"
47
48gdb_test_no_output "enable type-printer string"
49gdb_test "whatis bs" "string" "whatis with enabled printer"
50
51gdb_test "whatis s" "templ<string>"
52
53remote_file host delete ${remote_python_file}