OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.base/] [exprs.exp] - Blame information for rev 107

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
#   Copyright (C) 1988, 1990, 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
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 2 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, write to the Free Software
15
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
 
17
# Please email any bugs, comments, and/or additions to this file to:
18
# bug-gdb@prep.ai.mit.edu
19
 
20
# This file was written by Rob Savoye. (rob@cygnus.com)
21
 
22
if $tracelevel {
23
    strace $tracelevel
24
}
25
 
26
#
27
# test running programs
28
#
29
set prms_id 0
30
set bug_id 0
31
 
32
set testfile "exprs"
33
set srcfile ${testfile}.c
34
set binfile ${objdir}/${subdir}/${testfile}
35
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
36
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
37
}
38
 
39
if [get_compiler_info ${binfile}] {
40
    return -1;
41
}
42
 
43
gdb_exit
44
gdb_start
45
gdb_reinitialize_dir $srcdir/$subdir
46
gdb_load ${binfile}
47
 
48
#
49
# set it up at a breakpoint so we can play with the variable values
50
#
51
 
52
if ![runto_main] then {
53
    perror "couldn't run to breakpoint"
54
    continue
55
}
56
 
57
proc test_expr { args } {
58
    if { [llength $args] % 2 } {
59
        warning "an even # of arguments should be passed to test_expr"
60
    }
61
    set last_ent [expr [llength $args] - 1];
62
    set testname [lindex $args $last_ent];
63
    if [gdb_test [lindex $args 0] "" "$testname (setup)"] {
64
        gdb_suppress_tests;
65
    }
66
    for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} {
67
        if [gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"] {
68
            gdb_suppress_tests;
69
        }
70
    }
71
    gdb_stop_suppressing_tests;
72
}
73
#
74
# test expressions with "char" types
75
#
76
test_expr "set variable v_char=127" "print v_char == 0" "\\$\[0-9\]* = $false"  "print v_char == 127" "\\$\[0-9\]* = $true"  "print char =="
77
test_expr "set variable v_char=127" "print v_char != 0" "\\$\[0-9\]* = $true"  "print v_char != 127" "\\$\[0-9\]* = $false"  "print char !="
78
test_expr "set variable v_char=127" "print v_char < 0" "\\$\[0-9\]* = $false"  "print v_char < 127" "\\$\[0-9\]* = $false"  "print char <"
79
test_expr "set variable v_char=127" "print v_char > 0" "\\$\[0-9\]* = $true"  "print v_char > 127" "\\$\[0-9\]* = $false"  "print char >"
80
#
81
# test expressions with "signed char" types
82
#
83
test_expr "set variable v_signed_char=127" "print v_signed_char == 0" "\\$\[0-9\]* = $false"  "print v_signed_char == 127" "\\$\[0-9\]* = $true"  "print signed char =="
84
test_expr "set variable v_signed_char=127" "print v_signed_char != 0" "\\$\[0-9\]* = $true"  "print v_signed_char != 127" "\\$\[0-9\]* = $false"  "print signed char !="
85
test_expr "set variable v_signed_char=127" "print v_signed_char < 0" "\\$\[0-9\]* = $false"  "print v_signed_char < 127" "\\$\[0-9\]* = $false"  "print signed char <"
86
test_expr "set variable v_signed_char=127" "print v_signed_char > 0" "\\$\[0-9\]* = $true"  "print v_signed_char > 127" "\\$\[0-9\]* = $false"  "print signed char >"
87
# make char a minus
88
test_expr "set variable v_signed_char=-1" "print v_signed_char == 0" "\\$\[0-9\]* = $false"  "print v_signed_char == -1" "\\$\[0-9\]* = $true"  "print signed char == (minus)"
89
test_expr "set variable v_signed_char=-1" "print v_signed_char != 0" "\\$\[0-9\]* = $true"  "print v_signed_char != -1" "\\$\[0-9\]* = $false"  "print signed char != (minus)"
90
test_expr "set variable v_signed_char=-1" "print v_signed_char < 0" "\\$\[0-9\]* = $true"  "print v_signed_char < 127" "\\$\[0-9\]* = $true"  "print signed char < (minus)"
91
test_expr "set variable v_signed_char=-1" "print v_signed_char > 0" "\\$\[0-9\]* = $false"  "print v_signed_char > 127" "\\$\[0-9\]* = $false"  "print signed char > (minus)"
92
#
93
# test expressions with "unsigned char" types
94
#
95
test_expr "set variable v_unsigned_char=127" "print v_unsigned_char == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_char == 127" "\\$\[0-9\]* = $true"  "print unsigned char =="
96
test_expr "set variable v_unsigned_char=127" "print v_unsigned_char != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_char != 127" "\\$\[0-9\]* = $false"  "print unsigned char !="
97
test_expr "set variable v_unsigned_char=127" "print v_unsigned_char < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_char < 127" "\\$\[0-9\]* = $false"  "print unsigned char <"
98
test_expr "set variable v_unsigned_char=127" "print v_unsigned_char > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_char > 127" "\\$\[0-9\]* = $false"  "print unsigned char >"
99
# make char a minus
100
# FIXME:  gdb mishandles the cast (unsigned char) on the i960, so I've
101
# set up an expected failure for this case.
102
setup_xfail "i960-*-*" 1821
103
test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_char == ~0" "\\$\[0-9\]* = $false"  "print v_unsigned_char == (unsigned char)~0" "\\$\[0-9\]* = $true"  "print unsigned char == (~0)"
104
# FIXME:  gdb mishandles the cast (unsigned char) on the i960, so I've
105
# set up an expected failure for this case.
106
setup_xfail "i960-*-*" 1821
107
test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_char != (unsigned char)~0" "\\$\[0-9\]* = $false"  "print unsigned char != (~0)"
108
test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_char < 127" "\\$\[0-9\]* = $false"  "print unsigned char < (~0)"
109
test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_char > 127" "\\$\[0-9\]* = $true"  "print unsigned char > (~0)"
110
#
111
# test expressions with "short" types
112
#
113
test_expr "set variable v_short=0x7FFF" "print v_short == 0" "\\$\[0-9\]* = $false"  "print v_short == 0x7FFF" "\\$\[0-9\]* = $true"  "print signed short =="
114
test_expr "set variable v_short=0x7FFF" "print v_short != 0" "\\$\[0-9\]* = $true"  "print v_short != 0x7FFF" "\\$\[0-9\]* = $false"  "print signed short !="
115
test_expr "set variable v_short=0x7FFF" "print v_short < 0" "\\$\[0-9\]* = $false"  "print v_short < 0x7FFF" "\\$\[0-9\]* = $false"  "print signed short <"
116
test_expr "set variable v_short=0x7FFF" "print v_short > 0" "\\$\[0-9\]* = $true"  "print v_short > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed short >"
117
# make short a minus
118
test_expr "set variable v_short=-1" "print v_short == 0" "\\$\[0-9\]* = $false"  "print v_short == -1" "\\$\[0-9\]* = $true"  "print signed short == (minus)"
119
test_expr "set variable v_short=-1" "print v_short != 0" "\\$\[0-9\]* = $true"  "print v_short != -1" "\\$\[0-9\]* = $false"  "print signed short != (minus)"
120
test_expr "set variable v_short=-1" "print v_short < 0" "\\$\[0-9\]* = $true"  "print v_short < 0x7FFF" "\\$\[0-9\]* = $true"  "print signed short < (minus)"
121
test_expr "set variable v_short=-1" "print v_short > 0" "\\$\[0-9\]* = $false"  "print v_short > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed short > (minus)"
122
#
123
# test expressions with "signed short" types
124
#
125
test_expr "set variable v_signed_short=0x7FFF" "print v_signed_short == 0" "\\$\[0-9\]* = $false"  "print v_signed_short == 0x7FFF" "\\$\[0-9\]* = $true"  "print signed signed short =="
126
test_expr "set variable v_signed_short=0x7FFF" "print v_signed_short != 0" "\\$\[0-9\]* = $true"  "print v_signed_short != 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed short !="
127
test_expr "set variable v_signed_short=0x7FFF" "print v_signed_short < 0" "\\$\[0-9\]* = $false"  "print v_signed_short < 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed short <"
128
test_expr "set variable v_signed_short=0x7FFF" "print v_signed_short > 0" "\\$\[0-9\]* = $true"  "print v_signed_short > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed short >"
129
# make short a minus
130
test_expr "set variable v_signed_short=-1" "print v_signed_short == 0" "\\$\[0-9\]* = $false"  "print v_signed_short == -1" "\\$\[0-9\]* = $true"  "print signed signed short == (minus)"
131
test_expr "set variable v_signed_short=-1" "print v_signed_short != 0" "\\$\[0-9\]* = $true"  "print v_signed_short != -1" "\\$\[0-9\]* = $false"  "print signed signed short != (minus)"
132
test_expr "set variable v_signed_short=-1" "print v_signed_short < 0" "\\$\[0-9\]* = $true"  "print v_signed_short < 0x7FFF" "\\$\[0-9\]* = $true"  "print signed signed short < (minus)"
133
test_expr "set variable v_signed_short=-1" "print v_signed_short > 0" "\\$\[0-9\]* = $false"  "print v_signed_short > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed short > (minus)"
134
#
135
# test expressions with "unsigned short" types
136
#
137
test_expr "set variable v_unsigned_short=0x7FFF" "print v_unsigned_short == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_short == 0x7FFF" "\\$\[0-9\]* = $true"  "print unsigned short =="
138
test_expr "set variable v_unsigned_short=0x7FFF" "print v_unsigned_short != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_short != 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned short !="
139
test_expr "set variable v_unsigned_short=0x7FFF" "print v_unsigned_short < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_short < 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned short <"
140
test_expr "set variable v_unsigned_short=0x7FFF" "print v_unsigned_short > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_short > 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned short >"
141
# make short a minus
142
test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_short == ~0" "\\$\[0-9\]* = $false"  "print v_unsigned_short == (unsigned short)~0" "\\$\[0-9\]* = $true"  "print unsigned short == (~0)"
143
test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_short != (unsigned short)~0" "\\$\[0-9\]* = $false"  "print unsigned short != (~0)"
144
test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_short < 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned short < (~0)"
145
test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_short > 0x7FFF" "\\$\[0-9\]* = $true"  "print unsigned short > (~0)"
146
#
147
# test expressions with "int" types
148
#
149
test_expr "set variable v_int=0x7FFF" "print v_int == 0" "\\$\[0-9\]* = $false"  "print v_int == 0x7FFF" "\\$\[0-9\]* = $true"  "print signed int =="
150
test_expr "set variable v_int=0x7FFF" "print v_int != 0" "\\$\[0-9\]* = $true"  "print v_int != 0x7FFF" "\\$\[0-9\]* = $false"  "print signed int !="
151
test_expr "set variable v_int=0x7FFF" "print v_int < 0" "\\$\[0-9\]* = $false"  "print v_int < 0x7FFF" "\\$\[0-9\]* = $false"  "print signed int <"
152
test_expr "set variable v_int=0x7FFF" "print v_int > 0" "\\$\[0-9\]* = $true"  "print v_int > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed int >"
153
# make int a minus
154
test_expr "set variable v_int=-1" "print v_int == 0" "\\$\[0-9\]* = $false"  "print v_int == -1" "\\$\[0-9\]* = $true"  "print signed int == (minus)"
155
test_expr "set variable v_int=-1" "print v_int != 0" "\\$\[0-9\]* = $true"  "print v_int != -1" "\\$\[0-9\]* = $false"  "print signed int != (minus)"
156
test_expr "set variable v_int=-1" "print v_int < 0" "\\$\[0-9\]* = $true"  "print v_int < 0x7FFF" "\\$\[0-9\]* = $true"  "print signed int < (minus)"
157
test_expr "set variable v_int=-1" "print v_int > 0" "\\$\[0-9\]* = $false"  "print v_int > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed int > (minus)"
158
#
159
# test expressions with "signed int" types
160
#
161
test_expr "set variable v_signed_int=0x7FFF" "print v_signed_int == 0" "\\$\[0-9\]* = $false"  "print v_signed_int == 0x7FFF" "\\$\[0-9\]* = $true"  "print signed signed int =="
162
test_expr "set variable v_signed_int=0x7FFF" "print v_signed_int != 0" "\\$\[0-9\]* = $true"  "print v_signed_int != 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed int !="
163
test_expr "set variable v_signed_int=0x7FFF" "print v_signed_int < 0" "\\$\[0-9\]* = $false"  "print v_signed_int < 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed int <"
164
test_expr "set variable v_signed_int=0x7FFF" "print v_signed_int > 0" "\\$\[0-9\]* = $true"  "print v_signed_int > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed int >"
165
# make int a minus
166
test_expr "set variable v_signed_int=-1" "print v_signed_int == 0" "\\$\[0-9\]* = $false"  "print v_signed_int == -1" "\\$\[0-9\]* = $true"  "print signed signed int == (minus)"
167
test_expr "set variable v_signed_int=-1" "print v_signed_int != 0" "\\$\[0-9\]* = $true"  "print v_signed_int != -1" "\\$\[0-9\]* = $false"  "print signed signed int != (minus)"
168
test_expr "set variable v_signed_int=-1" "print v_signed_int < 0" "\\$\[0-9\]* = $true"  "print v_signed_int < 0x7FFF" "\\$\[0-9\]* = $true"  "print signed signed int < (minus)"
169
test_expr "set variable v_signed_int=-1" "print v_signed_int > 0" "\\$\[0-9\]* = $false"  "print v_signed_int > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed int > (minus)"
170
#
171
# test expressions with "unsigned int" types
172
#
173
test_expr "set variable v_unsigned_int=0x7FFF" "print v_unsigned_int == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_int == 0x7FFF" "\\$\[0-9\]* = $true"  "print unsigned int =="
174
test_expr "set variable v_unsigned_int=0x7FFF" "print v_unsigned_int != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_int != 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned int !="
175
test_expr "set variable v_unsigned_int=0x7FFF" "print v_unsigned_int < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_int < 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned int <"
176
test_expr "set variable v_unsigned_int=0x7FFF" "print v_unsigned_int > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_int > 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned int >"
177
# make int a minus
178
test_expr "set variable v_unsigned_int=~0" "print v_unsigned_int == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_int == ~0" "\\$\[0-9\]* = $true"  "print v_unsigned_int == (unsigned int)~0" "\\$\[0-9\]* = $true"  "print unsigned int == (~0)"
179
test_expr "set variable v_unsigned_int=~0" "print v_unsigned_int != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_int != (unsigned int)~0" "\\$\[0-9\]* = $false"  "print unsigned int != (~0)"
180
test_expr "set variable v_unsigned_int=~0" "print v_unsigned_int < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_int < 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned int < (~0)"
181
test_expr "set variable v_unsigned_int=~0" "print v_unsigned_int > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_int > 0x7FFF" "\\$\[0-9\]* = $true"  "print unsigned int > (~0)"
182
#
183
# test expressions with "long" types
184
#
185
test_expr "set variable v_long=0x7FFF" "print v_long == 0" "\\$\[0-9\]* = $false"  "print v_long == 0x7FFF" "\\$\[0-9\]* = $true"  "print signed long =="
186
test_expr "set variable v_long=0x7FFF" "print v_long != 0" "\\$\[0-9\]* = $true"  "print v_long != 0x7FFF" "\\$\[0-9\]* = $false"  "print signed long !="
187
test_expr "set variable v_long=0x7FFF" "print v_long < 0" "\\$\[0-9\]* = $false"  "print v_long < 0x7FFF" "\\$\[0-9\]* = $false"  "print signed long <"
188
test_expr "set variable v_long=0x7FFF" "print v_long > 0" "\\$\[0-9\]* = $true"  "print v_long > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed long >"
189
# make long a minus
190
test_expr "set variable v_long=-1" "print v_long == 0" "\\$\[0-9\]* = $false"  "print v_long == -1" "\\$\[0-9\]* = $true"  "print signed long == (minus)"
191
test_expr "set variable v_long=-1" "print v_long != 0" "\\$\[0-9\]* = $true"  "print v_long != -1" "\\$\[0-9\]* = $false"  "print signed long != (minus)"
192
test_expr "set variable v_long=-1" "print v_long < 0" "\\$\[0-9\]* = $true"  "print v_long < 0x7FFF" "\\$\[0-9\]* = $true"  "print signed long < (minus)"
193
test_expr "set variable v_long=-1" "print v_long > 0" "\\$\[0-9\]* = $false"  "print v_long > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed long > (minus)"
194
#
195
# test expressions with "signed long" types
196
#
197
test_expr "set variable v_signed_long=0x7FFF" "print v_signed_long == 0" "\\$\[0-9\]* = $false"  "print v_signed_long == 0x7FFF" "\\$\[0-9\]* = $true"  "print signed signed long =="
198
test_expr "set variable v_signed_long=0x7FFF" "print v_signed_long != 0" "\\$\[0-9\]* = $true"  "print v_signed_long != 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed long !="
199
test_expr "set variable v_signed_long=0x7FFF" "print v_signed_long < 0" "\\$\[0-9\]* = $false"  "print v_signed_long < 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed long <"
200
test_expr "set variable v_signed_long=0x7FFF" "print v_signed_long > 0" "\\$\[0-9\]* = $true"  "print v_signed_long > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed long >"
201
# make long a minus
202
test_expr "set variable v_signed_long=-1" "print v_signed_long == 0" "\\$\[0-9\]* = $false"  "print v_signed_long == -1" "\\$\[0-9\]* = $true"  "print signed signed long == (minus)"
203
test_expr "set variable v_signed_long=-1" "print v_signed_long != 0" "\\$\[0-9\]* = $true"  "print v_signed_long != -1" "\\$\[0-9\]* = $false"  "print signed signed long != (minus)"
204
test_expr "set variable v_signed_long=-1" "print v_signed_long < 0" "\\$\[0-9\]* = $true"  "print v_signed_long < 0x7FFF" "\\$\[0-9\]* = $true"  "print signed signed long < (minus)"
205
test_expr "set variable v_signed_long=-1" "print v_signed_long > 0" "\\$\[0-9\]* = $false"  "print v_signed_long > 0x7FFF" "\\$\[0-9\]* = $false"  "print signed signed long > (minus)"
206
#
207
# test expressions with "unsigned long" types
208
#
209
test_expr "set variable v_unsigned_long=0x7FFF" "print v_unsigned_long == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_long == 0x7FFF" "\\$\[0-9\]* = $true"  "print unsigned long =="
210
test_expr "set variable v_unsigned_long=0x7FFF" "print v_unsigned_long != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_long != 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned long !="
211
test_expr "set variable v_unsigned_long=0x7FFF" "print v_unsigned_long < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_long < 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned long <"
212
test_expr "set variable v_unsigned_long=0x7FFF" "print v_unsigned_long > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_long > 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned long >"
213
# make long a minus
214
test_expr "set variable v_unsigned_long=~0" "print v_unsigned_long == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_long == ~0" "\\$\[0-9\]* = $true"  "print v_unsigned_long == (unsigned long)~0" "\\$\[0-9\]* = $true"  "print unsigned long == (~0)"
215
test_expr "set variable v_unsigned_long=~0" "print v_unsigned_long != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_long != (unsigned long)~0" "\\$\[0-9\]* = $false"  "print unsigned long != (~0)"
216
test_expr "set variable v_unsigned_long=~0" "print v_unsigned_long < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_long < 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned long < (~0)"
217
test_expr "set variable v_unsigned_long=~0" "print v_unsigned_long > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_long > 0x7FFF" "\\$\[0-9\]* = $true"  "print unsigned long > (~0)"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.