testsuite: Fix false FAIL for gdb.base/morestack.exp
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.ada / fixed_points.exp
CommitLineData
618f726f 1# Copyright 2004-2016 Free Software Foundation, Inc.
fb6e1814
JG
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
e22f8b7c 5# the Free Software Foundation; either version 3 of the License, or
fb6e1814 6# (at your option) any later version.
e22f8b7c 7#
fb6e1814
JG
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.
e22f8b7c 12#
fb6e1814 13# You should have received a copy of the GNU General Public License
e22f8b7c 14# along with this program. If not, see <http://www.gnu.org/licenses/>.
fb6e1814 15
fb6e1814
JG
16load_lib "ada.exp"
17
ec3c07fc
NS
18if { [skip_ada_tests] } { return -1 }
19
8223e12c 20standard_ada_testfile fixed_points
fb6e1814 21
ec3c07fc
NS
22if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
23 return -1
fb6e1814
JG
24}
25
09050809 26clean_restart ${testfile}
fb6e1814 27
464dd14d
JB
28set bp_location [gdb_get_line_number "Set breakpoint here" ${testdir}/fixed_points.adb]
29runto "fixed_points.adb:$bp_location"
fb6e1814 30
c31af87b
JG
31# Fixed point subtypes:
32
fb6e1814 33gdb_test "print base_object" \
b6db24e5 34 "= -50" \
fb6e1814
JG
35 "p on a fixed point type"
36
37gdb_test "print subtype_object" \
b6db24e5 38 "= -50" \
fb6e1814
JG
39 "p on a subtype fixed point type"
40
41gdb_test "print new_type_object" \
b6db24e5 42 "= -50" \
fb6e1814 43 "p on a new fixed point type"
c31af87b
JG
44
45# Overprecise delta:
46
47gdb_test "print Overprecise_Object" \
48 "= 0.13579135791"
49
50gdb_test "ptype Overprecise_Object" \
51 "= delta 0.135791"
This page took 1.775264 seconds and 4 git commands to generate.