]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.java/jv-exp.exp
Updated copyright notices for most files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.java / jv-exp.exp
CommitLineData
9b254dd1 1# Copyright 2000, 2007, 2008 Free Software Foundation, Inc.
8caabe69
AG
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
8caabe69 6# (at your option) any later version.
e22f8b7c 7#
8caabe69
AG
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#
8caabe69 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/>.
8caabe69
AG
15
16# Please email any bugs, comments, and/or additions to this file to:
17# bug-gdb@prep.ai.mit.edu
18
19if $tracelevel then {
20 strace $tracelevel
21}
22
23set prms_id 0
24set bug_id 0
25
26# Set the current language to Java. This counts as a test. If it
27# fails, then we skip the other tests.
28
29proc set_lang_java {} {
30 global gdb_prompt
31
32 if [gdb_test "set language java" "" "set language java"] {
33 return 0
34 }
35
36 if [gdb_test "show language" ".* source language is \"java\".*"] {
37 return 0
38 }
39 return 1;
40}
41
42proc test_comparisons {} {
43 global gdb_prompt
44
45 # Test various comparisons.
46
47 gdb_test "p 1 > 2" " = false"
48 gdb_test "p 1 < 2" " = true"
49}
50
51# Start with a fresh gdb.
52
53gdb_exit
54gdb_start
55gdb_reinitialize_dir $srcdir/$subdir
56
57gdb_test "set print sevenbit-strings" ""
58gdb_test "set print address off" "" ""
59gdb_test "set width 0" ""
60
61if [set_lang_java] then {
62 test_comparisons
63} else {
64 fail "Java expression tests suppressed"
65}