| OLD | NEW |
| 1 # Copyright 1998-1999, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1998-1999, 2007-2012 Free Software Foundation, Inc. |
| 2 | 2 |
| 3 # This program is free software; you can redistribute it and/or modify | 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 | 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 | 5 # the Free Software Foundation; either version 3 of the License, or |
| 6 # (at your option) any later version. | 6 # (at your option) any later version. |
| 7 # | 7 # |
| 8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
| 12 # | 12 # |
| 13 # You should have received a copy of the GNU General Public License | 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/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | 15 |
| 16 # This file was written by Elena Zannoni (ezannoni@cygnus.com) | 16 # This file was written by Elena Zannoni (ezannoni@cygnus.com) |
| 17 | 17 |
| 18 # This file is part of the gdb testsuite | 18 # This file is part of the gdb testsuite |
| 19 # | 19 # |
| 20 # tests for correctenss of relational operators, associativity and precedence | 20 # tests for correctenss of relational operators, associativity and precedence |
| 21 # with integer type variables | 21 # with integer type variables |
| 22 # | 22 # |
| 23 | 23 |
| 24 if $tracelevel then { | |
| 25 strace $tracelevel | |
| 26 } | |
| 27 | |
| 28 # | 24 # |
| 29 # test running programs | 25 # test running programs |
| 30 # | 26 # |
| 31 | 27 |
| 32 if { [prepare_for_testing relational.exp relational int-type.c {debug nowarnings
}] } { | 28 if { [prepare_for_testing relational.exp relational int-type.c {debug nowarnings
}] } { |
| 33 return -1 | 29 return -1 |
| 34 } | 30 } |
| 35 | 31 |
| 36 if [get_compiler_info not-used] { | 32 if [get_compiler_info] { |
| 37 return -1; | 33 return -1; |
| 38 } | 34 } |
| 39 | 35 |
| 40 # | 36 # |
| 41 # set it up at a breakpoint so we can play with the variable values | 37 # set it up at a breakpoint so we can play with the variable values |
| 42 # | 38 # |
| 43 | 39 |
| 44 if ![runto_main] then { | 40 if ![runto_main] then { |
| 45 perror "couldn't run to breakpoint" | 41 perror "couldn't run to breakpoint" |
| 46 continue | 42 continue |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 183 |
| 188 # 2 3 0 | 184 # 2 3 0 |
| 189 gdb_test "print x == (y == z)" "$false" "print value of x==(y==z)" | 185 gdb_test "print x == (y == z)" "$false" "print value of x==(y==z)" |
| 190 | 186 |
| 191 gdb_test_no_output "set variable x=1" " set variable x" | 187 gdb_test_no_output "set variable x=1" " set variable x" |
| 192 gdb_test_no_output "set variable z=4" " set variable z" | 188 gdb_test_no_output "set variable z=4" " set variable z" |
| 193 | 189 |
| 194 # 1 3 4 | 190 # 1 3 4 |
| 195 gdb_test "print (x == y) < z" "$true" "print value of (x==y)<z" | 191 gdb_test "print (x == y) < z" "$true" "print value of (x==y)<z" |
| 196 | 192 |
| OLD | NEW |