Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: RFA/testsuite/c++: Overhaul userdef.exp
@ 2002-02-18 10:52 Michael Elizabeth Chastain
  2002-02-18 10:57 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Elizabeth Chastain @ 2002-02-18 10:52 UTC (permalink / raw)
  To: drow, gdb-patches

This patch is approved, subject to (you guessed it) addition of the
year 2002 to the copyright line.

I adore this kind of overhaul, thanks.

I proofread the test script and it is all okay.

I ran this through my test bed and did a before-and-after diff.
All configurations look no worse than before.

Michael C

===

2002-02-16  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.c++/userdef.exp: Test overloaded operators properly.
	Remove xfails.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFA/testsuite/c++: Overhaul userdef.exp
  2002-02-18 10:52 RFA/testsuite/c++: Overhaul userdef.exp Michael Elizabeth Chastain
@ 2002-02-18 10:57 ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-02-18 10:57 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: gdb-patches

On Mon, Feb 18, 2002 at 12:52:12PM -0600, Michael Elizabeth Chastain wrote:
> This patch is approved, subject to (you guessed it) addition of the
> year 2002 to the copyright line.
> 
> I adore this kind of overhaul, thanks.
> 
> I proofread the test script and it is all okay.
> 
> I ran this through my test bed and did a before-and-after diff.
> All configurations look no worse than before.
> 
> Michael C
> 
> ===
> 
> 2002-02-16  Daniel Jacobowitz  <drow@mvista.com>
> 
> 	* gdb.c++/userdef.exp: Test overloaded operators properly.
> 	Remove xfails.

Thanks, committed.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFA/testsuite/c++: Overhaul userdef.exp
@ 2002-02-18 11:00 Michael Elizabeth Chastain
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Elizabeth Chastain @ 2002-02-18 11:00 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

I'll take care of the copyright year.

Michael C


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RFA/testsuite/c++: Overhaul userdef.exp
@ 2002-02-16 14:30 Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-02-16 14:30 UTC (permalink / raw)
  To: gdb-patches

Userdef.exp was set to PASS tests if GDB's output contained FIXME, xfail
all other output, and contained a pile of HPPA xfail markers.  It hasn't
been substantively checked since the HP merge.

I've removed the xfails; I'm not sure if the tests work on HP aCC, but they
ought to.  If not and someone kindly gives me enough information, I'll fix
them.  I've also made the tests actually check for output, and thus pass
(and highlight the bugs in my last message).

Michael, OK to commit these?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2002-02-16  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.c++/userdef.exp: Test overloaded operators properly.
	Remove xfails.

Index: testsuite/gdb.c++/userdef.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/userdef.exp,v
retrieving revision 1.4
diff -u -p -r1.4 userdef.exp
--- userdef.exp	2001/12/07 22:02:23	1.4
+++ userdef.exp	2002/02/16 22:20:02
@@ -64,279 +64,64 @@ send_gdb "break marker1\n" ; gdb_expect 
     }
 
 
-setup_xfail "hppa*-*-*"
-send_gdb "print one+two\n"
-gdb_expect {
-    -re "FIXME.*$gdb_prompt $" {
-        pass "print value of one + two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one two" }
-    timeout           { fail "(timeout) print value of one two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one-two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one - two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one - two" }
-    timeout           { fail "(timeout) print value of one - two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one*two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one * two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one * two" }
-    timeout           { fail "(timeout) print value of one * two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one/two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one / two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one / two" }
-    timeout           { fail "(timeout) print value of one / two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one%two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one % two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one % two" }
-    timeout           { fail "(timeout) print value of one % two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one&&two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one && two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one && two" }
-    timeout           { fail "(timeout) print value of one && two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one||two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one|| two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one|| two" }
-    timeout           { fail "(timeout) print value of one|| two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one&two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one & two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one & two" }
-    timeout           { fail "(timeout) print value of one & two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one|two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one | two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one | two" }
-    timeout           { fail "(timeout) print value of one | two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one ^ two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one ^  two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one ^  two" }
-    timeout           { fail "(timeout) print value of one ^  two" }
-  }
-
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one < two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one <  two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one <  two" }
-    timeout           { fail "(timeout) print value of one <  two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one <= two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one <=  two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one <=  two" }
-    timeout           { fail "(timeout) print value of one <=  two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one > two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one  > two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one >  two" }
-    timeout           { fail "(timeout) print value of one >  two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one >= two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one >=  two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one >=  two" }
-    timeout           { fail "(timeout) print value of one >=  two" }
-  }
-
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one==two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one == two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one == two" }
-    timeout           { fail "(timeout) print value of one == two" }
-  }
-
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one!=two\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one != two"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one != two" }
-    timeout           { fail "(timeout) print value of one != two" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one<<31\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one<<31"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one<<31" }
-    timeout           { fail "(timeout) print value of one<<31" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one>>31\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one>>31"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one>>31" }
-    timeout           { fail "(timeout) print value of one>>31" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print !one\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of !one"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of !one" }
-    timeout           { fail "(timeout) print value of !one" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print ~one\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of ~one"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of ~one" }
-    timeout           { fail "(timeout) print value of ~one" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print -one\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of -one"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of -one" }
-    timeout           { fail "(timeout) print value of -one" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one++\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one++"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one++" }
-    timeout           { fail "(timeout) print value of one++" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print ++one\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of ++one>>31"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of ++one" }
-    timeout           { fail "(timeout) print value of ++one" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one--\n"
-gdb_expect {
-    -re ".*.FIXME*$gdb_prompt $" {
-        pass "print value of one-->>31"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one-->>31" }
-    timeout           { fail "(timeout) print value of one-->>31" }
-  }
-
-
-setup_xfail "hppa*-*-*"
-send_gdb "print --one\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of --one"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of --one" }
-    timeout           { fail "(timeout) print value of --one" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print one+=7\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of one+=7"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of one+=7" }
-    timeout           { fail "(timeout) print value of one+=7" }
-  }
-
-setup_xfail "hppa*-*-*"
-send_gdb "print two=one\n"
-gdb_expect {
-    -re ".*FIXME.*$gdb_prompt $" {
-        pass "print value of two=one"
-      }
-    -re ".*$gdb_prompt $" { xfail "print value of two=one" }
-    timeout           { fail "(timeout) print value of two=one" }
-  }
+gdb_test "print one + two" "\\\$\[0-9\]* = {x = 6, y = 8}"
+
+gdb_test "print one - two" "\\\$\[0-9\]* = {x = -2, y = -2}"
+
+gdb_test "print one * two" "\\\$\[0-9\]* = {x = 8, y = 15}"
+
+gdb_test "print one / two" "\\\$\[0-9\]* = {x = 0, y = 0}"
+
+gdb_test "print one % two" "\\\$\[0-9\]* = {x = 2, y = 3}"
+
+gdb_test "print one && two" "\\\$\[0-9\]* = 1\[\r\n\]"
+
+gdb_test "print one || two" "\\\$\[0-9\]* = 1\[\r\n\]"
+
+gdb_test "print one & two" "\\\$\[0-9\]* = {x = 0, y = 1}"
+
+gdb_test "print one | two" "\\\$\[0-9\]* = {x = 6, y = 7}"
+
+gdb_test "print one ^ two" "\\\$\[0-9\]* = {x = 6, y = 6}"
+
+gdb_test "print one < two" "\\\$\[0-9\]* = 1\[\r\n\]"
+
+gdb_test "print one <= two" "\\\$\[0-9\]* = 1\[\r\n\]"
+
+gdb_test "print one > two" "\\\$\[0-9\]* = 0\[\r\n\]"
+
+gdb_test "print one >= two" "\\\$\[0-9\]* = 0\[\r\n\]"
+
+gdb_test "print one == two" "\\\$\[0-9\]* = 0\[\r\n\]"
+
+gdb_test "print one != two" "\\\$\[0-9\]* = 1\[\r\n\]"
+
+# Can't really check the output of this one without knowing
+# target integer width.  Make sure we don't try to call
+# the iostreams operator instead, though.
+gdb_test "print one << 31" "\\\$\[0-9\]* = {x = -?\[0-9\]*, y = -?\[0-9\]*}"
+
+# Should be fine even on < 32-bit targets.
+gdb_test "print one >> 31" "\\\$\[0-9\]* = {x = 0, y = 0}"
+
+gdb_test "print !one" "\\\$\[0-9\]* = 0\[\r\n\]"
+
+# Assumes 2's complement.  So does everything...
+gdb_test "print ~one" "\\\$\[0-9\]* = {x = -3, y = -4}"
+
+gdb_test "print -one" "\\\$\[0-9\]* = {x = -2, y = -3}"
+
+gdb_test "print one++" "\\\$\[0-9\]* = {x = 2, y = 4}"
+
+gdb_test "print ++one" "\\\$\[0-9\]* = {x = 3, y = 4}"
+
+gdb_test "print one--" "\\\$\[0-9\]* = {x = 3, y = 3}"
+
+gdb_test "print --one" "\\\$\[0-9\]* = {x = 2, y = 3}"
+
+gdb_test "print one += 7" "\\\$\[0-9\]* = {x = 9, y = 10}"
+
+gdb_test "print two = one" "\\\$\[0-9\]* = {x = 9, y = 10}"
 
 # Check that GDB tolerates whitespace in operator names.
 gdb_test "break A1::'operator+'" ".*Breakpoint $decimal at.*"


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-02-18 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-18 10:52 RFA/testsuite/c++: Overhaul userdef.exp Michael Elizabeth Chastain
2002-02-18 10:57 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2002-02-18 11:00 Michael Elizabeth Chastain
2002-02-16 14:30 Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox