]> Git Repo - binutils.git/blame - gdb/testsuite/gdb.base/enumval.exp
Update years in copyright notice for the GDB files.
[binutils.git] / gdb / testsuite / gdb.base / enumval.exp
CommitLineData
efd4ebc3
JK
1# This testcase is part of GDB, the GNU debugger.
2
28e7fd62 3# Copyright 2012-2013 Free Software Foundation, Inc.
efd4ebc3
JK
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18set testfile "enumval"
19set srcfile ${testfile}.c
20set binfile ${objdir}/${subdir}/${testfile}
21
22if { [prepare_for_testing enumval.exp "enumval" "" {debug}] } {
23 return -1
24}
25
26# Check the real contents.
4648e588
JK
27
28set test "print e"
29gdb_test_multiple $test $test {
30 -re " = J\r\n$gdb_prompt $" {
31 pass $test
32 }
33 -re " = 4294967295\r\n$gdb_prompt $" {
34 if {[test_compiler_info {gcc-[0-3]-*}]
35 || [test_compiler_info {gcc-4-[0-6]-*}]} {
36 xfail $test
37 } else {
38 fail $test
39 }
40 }
41}
42
43set test "print f"
44gdb_test_multiple $test $test {
45 -re " = K\r\n$gdb_prompt $" {
46 pass $test
47 }
48 -re " = -1152921504606846976\r\n$gdb_prompt $" {
49 if {[test_compiler_info {gcc-[0-3]-*}]
50 || [test_compiler_info {gcc-4-[0-6]-*}]} {
51 xfail $test
52 } else {
53 fail $test
54 }
55 }
56}
efd4ebc3
JK
57
58gdb_test "print J" "= J"
4648e588
JK
59
60set test "print K"
61gdb_test_multiple $test $test {
62 -re " = K\r\n$gdb_prompt $" {
63 pass $test
64 }
65 -re " = <optimized out>\r\n$gdb_prompt $" {
66 if {[test_compiler_info {gcc-[0-3]-*}]
67 || [test_compiler_info {gcc-4-[0-6]-*}]} {
68 xfail $test
69 } else {
70 fail $test
71 }
72 }
73}
This page took 0.276506 seconds and 4 git commands to generate.