gdb/fortran: Update rules for printing whitespace in types
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.fortran / ptype-on-functions.exp
CommitLineData
bf7a4de1
AB
1# Copyright 2019 Free Software Foundation, Inc.
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
16# This file contains a test for printing the types of functions.
17
18if { [skip_fortran_tests] } { return -1 }
19
20standard_testfile .f90
21load_lib "fortran.exp"
22
23if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
24 return -1
25}
26
27if ![runto MAIN__] then {
28 perror "couldn't run to breakpoint MAIN__"
29 continue
30}
31
32gdb_test "ptype some_module::get_number" \
33 "type = integer\\(kind=4\\) \\(Type __class_some_module_Number_t\\)"
34
35gdb_test "ptype some_module::set_number" \
36 "type = void \\(Type __class_some_module_Number_t, integer\\(kind=4\\)\\)"
37
38gdb_test "ptype is_bigger" \
39 "type = logical\\(kind=4\\) \\(integer\\(kind=4\\), integer\\(kind=4\\)\\)"
40
41gdb_test "ptype say_numbers" \
42 "type = void \\(integer\\(kind=4\\), integer\\(kind=4\\), integer\\(kind=4\\)\\)"
43
44gdb_test "ptype fun_ptr" \
f1fdc960 45 "type = PTR TO -> \\( integer\\(kind=4\\) \\(\\) \\(REF TO -> \\( integer\\(kind=4\\) \\)\\) \\)"
This page took 0.026618 seconds and 4 git commands to generate.