Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / oranking.exp
CommitLineData
88b9d363 1# Copyright 2008-2022 Free Software Foundation, Inc.
33540610
SW
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
f5f3a911
TT
16standard_testfile .cc
17
5b362f04 18if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
33540610
SW
19 return -1
20}
21
22############################################
23
24if ![runto_main] then {
25 perror "couldn't run to breakpoint main"
26 continue
27}
28
29gdb_breakpoint [gdb_get_line_number "end of main"]
30gdb_continue_to_breakpoint "end of main"
31
32# The 'test*' functions are to prove our understanding
33# of the overload resolution performed by the compiler
34# So, they should always pass, and the returned value
35# should match the corresponding call to 'foo*'
36
37setup_kfail "gdb/12096" *-*-*
38gdb_test "p foo0(b)" "10"
39
40gdb_test "p test1()" "12"
41gdb_test "p foo1(b)" "12"
42
43gdb_test "p test2()" "13"
44setup_kfail "gdb/12098" *-*-*
45gdb_test "p foo2(b)" "13"
46
47gdb_test "p test3()" "21"
48gdb_test "p foo3(1.0f)" "21"
49
50gdb_test "p test4()" "24"
33540610
SW
51gdb_test "p foo4(&a)" "24"
52
53gdb_test "p test5()" "26"
33540610
SW
54gdb_test "p foo5(c)" "26"
55
56gdb_test "p test6()" "28"
33540610
SW
57gdb_test "p foo6(bp)" "28"
58
59gdb_test "p test7()" "210"
33540610
SW
60gdb_test "p foo7(cp)" "210"
61
62gdb_test "p test8()" "212"
33540610
SW
63gdb_test "p foo8(co)" "212"
64
65gdb_test "p test9()" "214"
33540610
SW
66gdb_test "p foo9(co)" "214"
67
68gdb_test "p test10()" "216"
69setup_kfail "gdb/12098" *-*-*
70gdb_test "p foo10(amp)" "216"
71
72gdb_test "p test101()" "218"
33540610
SW
73gdb_test "p foo101(\"abc\")" "218"
74
75gdb_test "p test11()" "32"
76setup_kfail "gdb/12096" *-*-*
77gdb_test "p foo11(d)" "32"
78
79gdb_test "p test12()" "42"
80# this passes only because gdb does not yet
81# implement template function calling
82gdb_test "p foo12(1)" "42"
83
84gdb_test "p test13()" "44"
85setup_kfail "gdb/12098" *-*-*
86gdb_test "p foo13(c)" "44"
87
88gdb_test "p test14()" "46"
89setup_kfail "gdb/12096" *-*-*
90gdb_test "p foo14(e)" "46"
91
e15c3eb4
KS
92gdb_test "p test15 ()" "194"
93gdb_test "p foo15 (c)" "47"
94gdb_test "p foo15 (cc)" "48"
95gdb_test "p foo15 (vc)" "49"
96gdb_test "p foo15 (cvc)" "50"
This page took 1.351435 seconds and 4 git commands to generate.