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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.c++/] [userdef.exp] - Blame information for rev 106

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

Line No. Rev Author Line
1 106 markom
# Tests of overloaded operators resolution.
2
# Copyright (C) 1998, 1999 Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
 
18
# Please email any bugs, comments, and/or additions to this file to:
19
# bug-gdb@prep.ai.mit.edu
20
 
21
# written by Elena Zannoni (ezannoni@cygnus.com)
22
#
23
# source file "userdef.cc"
24
#
25
 
26
if $tracelevel then {
27
        strace $tracelevel
28
}
29
 
30
if { [skip_cplus_tests] } { continue }
31
 
32
set testfile "userdef"
33
set srcfile ${testfile}.cc
34
set binfile ${objdir}/${subdir}/${testfile}
35
 
36
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
37
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
38
}
39
 
40
 
41
gdb_exit
42
gdb_start
43
gdb_reinitialize_dir $srcdir/$subdir
44
gdb_load ${binfile}
45
 
46
 
47
if ![runto_main] then {
48
    perror "couldn't run to breakpoint"
49
    continue
50
}
51
 
52
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
53
    send_gdb "cont\n"
54
    gdb_expect {
55
        -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
56
            send_gdb "up\n"
57
            gdb_expect {
58
                -re ".*$gdb_prompt $" { pass "up from marker1" }
59
                timeout { fail "up from marker1" }
60
            }
61
        }
62
        -re "$gdb_prompt $" { fail "continue to marker1"  }
63
        timeout { fail "(timeout) continue to marker1"  }
64
    }
65
 
66
 
67
setup_xfail "hppa*-*-*"
68
send_gdb "print one+two\n"
69
gdb_expect {
70
    -re "FIXME.*$gdb_prompt $" {
71
        pass "print value of one + two"
72
      }
73
    -re ".*$gdb_prompt $" { xfail "print value of one two" }
74
    timeout           { fail "(timeout) print value of one two" }
75
  }
76
 
77
setup_xfail "hppa*-*-*"
78
send_gdb "print one-two\n"
79
gdb_expect {
80
    -re ".*FIXME.*$gdb_prompt $" {
81
        pass "print value of one - two"
82
      }
83
    -re ".*$gdb_prompt $" { xfail "print value of one - two" }
84
    timeout           { fail "(timeout) print value of one - two" }
85
  }
86
 
87
setup_xfail "hppa*-*-*"
88
send_gdb "print one*two\n"
89
gdb_expect {
90
    -re ".*FIXME.*$gdb_prompt $" {
91
        pass "print value of one * two"
92
      }
93
    -re ".*$gdb_prompt $" { xfail "print value of one * two" }
94
    timeout           { fail "(timeout) print value of one * two" }
95
  }
96
 
97
setup_xfail "hppa*-*-*"
98
send_gdb "print one/two\n"
99
gdb_expect {
100
    -re ".*FIXME.*$gdb_prompt $" {
101
        pass "print value of one / two"
102
      }
103
    -re ".*$gdb_prompt $" { xfail "print value of one / two" }
104
    timeout           { fail "(timeout) print value of one / two" }
105
  }
106
 
107
setup_xfail "hppa*-*-*"
108
send_gdb "print one%two\n"
109
gdb_expect {
110
    -re ".*FIXME.*$gdb_prompt $" {
111
        pass "print value of one % two"
112
      }
113
    -re ".*$gdb_prompt $" { xfail "print value of one % two" }
114
    timeout           { fail "(timeout) print value of one % two" }
115
  }
116
 
117
setup_xfail "hppa*-*-*"
118
send_gdb "print one&&two\n"
119
gdb_expect {
120
    -re ".*FIXME.*$gdb_prompt $" {
121
        pass "print value of one && two"
122
      }
123
    -re ".*$gdb_prompt $" { xfail "print value of one && two" }
124
    timeout           { fail "(timeout) print value of one && two" }
125
  }
126
 
127
setup_xfail "hppa*-*-*"
128
send_gdb "print one||two\n"
129
gdb_expect {
130
    -re ".*FIXME.*$gdb_prompt $" {
131
        pass "print value of one|| two"
132
      }
133
    -re ".*$gdb_prompt $" { xfail "print value of one|| two" }
134
    timeout           { fail "(timeout) print value of one|| two" }
135
  }
136
 
137
setup_xfail "hppa*-*-*"
138
send_gdb "print one&two\n"
139
gdb_expect {
140
    -re ".*FIXME.*$gdb_prompt $" {
141
        pass "print value of one & two"
142
      }
143
    -re ".*$gdb_prompt $" { xfail "print value of one & two" }
144
    timeout           { fail "(timeout) print value of one & two" }
145
  }
146
 
147
setup_xfail "hppa*-*-*"
148
send_gdb "print one|two\n"
149
gdb_expect {
150
    -re ".*FIXME.*$gdb_prompt $" {
151
        pass "print value of one | two"
152
      }
153
    -re ".*$gdb_prompt $" { xfail "print value of one | two" }
154
    timeout           { fail "(timeout) print value of one | two" }
155
  }
156
 
157
setup_xfail "hppa*-*-*"
158
send_gdb "print one ^ two\n"
159
gdb_expect {
160
    -re ".*FIXME.*$gdb_prompt $" {
161
        pass "print value of one ^  two"
162
      }
163
    -re ".*$gdb_prompt $" { xfail "print value of one ^  two" }
164
    timeout           { fail "(timeout) print value of one ^  two" }
165
  }
166
 
167
 
168
setup_xfail "hppa*-*-*"
169
send_gdb "print one < two\n"
170
gdb_expect {
171
    -re ".*FIXME.*$gdb_prompt $" {
172
        pass "print value of one <  two"
173
      }
174
    -re ".*$gdb_prompt $" { xfail "print value of one <  two" }
175
    timeout           { fail "(timeout) print value of one <  two" }
176
  }
177
 
178
setup_xfail "hppa*-*-*"
179
send_gdb "print one <= two\n"
180
gdb_expect {
181
    -re ".*FIXME.*$gdb_prompt $" {
182
        pass "print value of one <=  two"
183
      }
184
    -re ".*$gdb_prompt $" { xfail "print value of one <=  two" }
185
    timeout           { fail "(timeout) print value of one <=  two" }
186
  }
187
 
188
setup_xfail "hppa*-*-*"
189
send_gdb "print one > two\n"
190
gdb_expect {
191
    -re ".*FIXME.*$gdb_prompt $" {
192
        pass "print value of one  > two"
193
      }
194
    -re ".*$gdb_prompt $" { xfail "print value of one >  two" }
195
    timeout           { fail "(timeout) print value of one >  two" }
196
  }
197
 
198
setup_xfail "hppa*-*-*"
199
send_gdb "print one >= two\n"
200
gdb_expect {
201
    -re ".*FIXME.*$gdb_prompt $" {
202
        pass "print value of one >=  two"
203
      }
204
    -re ".*$gdb_prompt $" { xfail "print value of one >=  two" }
205
    timeout           { fail "(timeout) print value of one >=  two" }
206
  }
207
 
208
 
209
setup_xfail "hppa*-*-*"
210
send_gdb "print one==two\n"
211
gdb_expect {
212
    -re ".*FIXME.*$gdb_prompt $" {
213
        pass "print value of one == two"
214
      }
215
    -re ".*$gdb_prompt $" { xfail "print value of one == two" }
216
    timeout           { fail "(timeout) print value of one == two" }
217
  }
218
 
219
 
220
setup_xfail "hppa*-*-*"
221
send_gdb "print one!=two\n"
222
gdb_expect {
223
    -re ".*FIXME.*$gdb_prompt $" {
224
        pass "print value of one != two"
225
      }
226
    -re ".*$gdb_prompt $" { xfail "print value of one != two" }
227
    timeout           { fail "(timeout) print value of one != two" }
228
  }
229
 
230
setup_xfail "hppa*-*-*"
231
send_gdb "print one<<31\n"
232
gdb_expect {
233
    -re ".*FIXME.*$gdb_prompt $" {
234
        pass "print value of one<<31"
235
      }
236
    -re ".*$gdb_prompt $" { xfail "print value of one<<31" }
237
    timeout           { fail "(timeout) print value of one<<31" }
238
  }
239
 
240
setup_xfail "hppa*-*-*"
241
send_gdb "print one>>31\n"
242
gdb_expect {
243
    -re ".*FIXME.*$gdb_prompt $" {
244
        pass "print value of one>>31"
245
      }
246
    -re ".*$gdb_prompt $" { xfail "print value of one>>31" }
247
    timeout           { fail "(timeout) print value of one>>31" }
248
  }
249
 
250
setup_xfail "hppa*-*-*"
251
send_gdb "print !one\n"
252
gdb_expect {
253
    -re ".*FIXME.*$gdb_prompt $" {
254
        pass "print value of !one"
255
      }
256
    -re ".*$gdb_prompt $" { xfail "print value of !one" }
257
    timeout           { fail "(timeout) print value of !one" }
258
  }
259
 
260
setup_xfail "hppa*-*-*"
261
send_gdb "print ~one\n"
262
gdb_expect {
263
    -re ".*FIXME.*$gdb_prompt $" {
264
        pass "print value of ~one"
265
      }
266
    -re ".*$gdb_prompt $" { xfail "print value of ~one" }
267
    timeout           { fail "(timeout) print value of ~one" }
268
  }
269
 
270
setup_xfail "hppa*-*-*"
271
send_gdb "print -one\n"
272
gdb_expect {
273
    -re ".*FIXME.*$gdb_prompt $" {
274
        pass "print value of -one"
275
      }
276
    -re ".*$gdb_prompt $" { xfail "print value of -one" }
277
    timeout           { fail "(timeout) print value of -one" }
278
  }
279
 
280
setup_xfail "hppa*-*-*"
281
send_gdb "print one++\n"
282
gdb_expect {
283
    -re ".*FIXME.*$gdb_prompt $" {
284
        pass "print value of one++"
285
      }
286
    -re ".*$gdb_prompt $" { xfail "print value of one++" }
287
    timeout           { fail "(timeout) print value of one++" }
288
  }
289
 
290
setup_xfail "hppa*-*-*"
291
send_gdb "print ++one\n"
292
gdb_expect {
293
    -re ".*FIXME.*$gdb_prompt $" {
294
        pass "print value of ++one>>31"
295
      }
296
    -re ".*$gdb_prompt $" { xfail "print value of ++one" }
297
    timeout           { fail "(timeout) print value of ++one" }
298
  }
299
 
300
setup_xfail "hppa*-*-*"
301
send_gdb "print one--\n"
302
gdb_expect {
303
    -re ".*.FIXME*$gdb_prompt $" {
304
        pass "print value of one-->>31"
305
      }
306
    -re ".*$gdb_prompt $" { xfail "print value of one-->>31" }
307
    timeout           { fail "(timeout) print value of one-->>31" }
308
  }
309
 
310
 
311
setup_xfail "hppa*-*-*"
312
send_gdb "print --one\n"
313
gdb_expect {
314
    -re ".*FIXME.*$gdb_prompt $" {
315
        pass "print value of --one"
316
      }
317
    -re ".*$gdb_prompt $" { xfail "print value of --one" }
318
    timeout           { fail "(timeout) print value of --one" }
319
  }
320
 
321
setup_xfail "hppa*-*-*"
322
send_gdb "print one+=7\n"
323
gdb_expect {
324
    -re ".*FIXME.*$gdb_prompt $" {
325
        pass "print value of one+=7"
326
      }
327
    -re ".*$gdb_prompt $" { xfail "print value of one+=7" }
328
    timeout           { fail "(timeout) print value of one+=7" }
329
  }
330
 
331
setup_xfail "hppa*-*-*"
332
send_gdb "print two=one\n"
333
gdb_expect {
334
    -re ".*FIXME.*$gdb_prompt $" {
335
        pass "print value of two=one"
336
      }
337
    -re ".*$gdb_prompt $" { xfail "print value of two=one" }
338
    timeout           { fail "(timeout) print value of two=one" }
339
  }
340
 
341
gdb_exit
342
return 0

powered by: WebSVN 2.1.0

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