Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* FYI: small test suite cleanup
@ 2009-02-13 16:36 Tom Tromey
  2009-02-13 16:57 ` Pierre Muller
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2009-02-13 16:36 UTC (permalink / raw)
  To: gdb-patches

I needed get_sizeof for the charset patch, and while looking I found
multiple copies of this in the testsuite.

This patch consolidates most of them -- I left a get_valueofx in
pc-fp.exp.

Built and regtested on x86-64 (compile farm).

Tom

2009-02-13  Tom Tromey  <tromey@redhat.com>

	* gdb.base/remote.exp (get_sizeof): Remove.
	* gdb.base/long_long.exp (get_valueof, get_sizeof): Remove.
	* gdb.base/dfp-test.exp (get_valueof, get_sizeof): Remove.
	* gdb.base/sizeof.exp (get_valueof, get_sizeof): Remove.
	* lib/gdb.exp (get_valueof): Move from long_long.exp.
	(get_sizeof): Likewise.

diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
index 32f36a9..94fcb41 100644
--- a/gdb/testsuite/gdb.base/dfp-test.exp
+++ b/gdb/testsuite/gdb.base/dfp-test.exp
@@ -43,26 +43,6 @@ if ![runto_main] then {
     continue
 }
 
-# Detect the size of the target's basic types (from gdb.base/long_long.exp).
-
-proc get_valueof { fmt exp default } {
-    global gdb_prompt
-    send_gdb "print${fmt} ${exp}\n"
-    gdb_expect {
-	-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
-	    set val $expect_out(1,string)
-	}
-	timeout {
-	    set val ${default}
-	}
-    }
-    return ${val}
-}
-
-proc get_sizeof { type default } {
-    return [get_valueof "/d" "sizeof (${type})" $default]
-}
-
 set sizeof_long [get_sizeof "long" 4]
 
 proc d32_set_tests {} {
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index e585396..d0ad5ba 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -74,26 +74,6 @@ gdb_expect {
 
 # Detect the size of the target's basic types.
 
-proc get_valueof { fmt exp default } {
-    global gdb_prompt
-    send_gdb "print${fmt} ${exp}\n"
-    gdb_expect {
-	-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
-	    set val $expect_out(1,string)
-	    pass "get value of ${exp} ($val)"
-	}
-	timeout {
-	    set size ${default}
-	    fail "get value of ${exp} (timeout)"
-	}
-    }
-    return ${val}
-}
-
-proc get_sizeof { type default } {
-    return [get_valueof "/d" "sizeof (${type})" $default]
-}
-
 set sizeof_char [get_sizeof "char" 1]
 set sizeof_short [get_sizeof "short" 2]
 set sizeof_int [get_sizeof "int" 4]
diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp
index 0dee13a..113c56b 100644
--- a/gdb/testsuite/gdb.base/remote.exp
+++ b/gdb/testsuite/gdb.base/remote.exp
@@ -125,22 +125,6 @@ gdb_load_timed $binfile "limit" 0
 # Query GDB for the size of various types
 #
 
-proc get_sizeof { type default } {
-    global gdb_prompt
-    send_gdb "print/d sizeof (${type})\n"
-    gdb_expect {
-	-re "\\$\[0-9\]* = (\[0-9\]*).*$gdb_prompt $" {
-	    set size $expect_out(1,string)
-	    pass "get sizeof ${type} ($size)"
-	}
-	timeout {
-	    set size ${default}
-	    fail "get sizeof ${type} (timeout)"
-	}
-    }
-    return ${size}
-}
-
 # Get the size of random_data table (defaults to 48K).
 set sizeof_random_data [get_sizeof "random_data" 48*1024]
 
diff --git a/gdb/testsuite/gdb.base/sizeof.exp b/gdb/testsuite/gdb.base/sizeof.exp
index 61a6be3..82f0da2 100644
--- a/gdb/testsuite/gdb.base/sizeof.exp
+++ b/gdb/testsuite/gdb.base/sizeof.exp
@@ -61,24 +61,6 @@ if ![runto_main] then {
 # Query GDB for the size of various types
 #
 
-proc get_valueof { fmt exp default } {
-    global gdb_prompt
-
-    set test "get valueof \"${exp}\""
-    set val ${default}
-    gdb_test_multiple "print${fmt} ${exp}" "$test" {
-	-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
-	    set val $expect_out(1,string)
-	    pass "$test ($val)"
-	}
-    }
-    return ${val}
-}
-
-proc get_sizeof { type default } {
-    return [get_valueof "/d" "sizeof (${type})" $default]
-}
-
 gdb_test "next"
 
 set sizeof_char [get_sizeof "char" 1]
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b0059b7..e329b96 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2878,3 +2878,26 @@ proc prepare_for_testing { testname executable {sources ""} {options {debug}}} {
 
     return 0
 }
+
+proc get_valueof { fmt exp default } {
+    global gdb_prompt
+
+    set test "get valueof \"${exp}\""
+    set val ${default}
+    gdb_test_multiple "print${fmt} ${exp}" "$test" {
+	-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
+	    set val $expect_out(1,string)
+	    pass "$test ($val)"
+	}
+	timeout {
+	    set size ${default}
+	    fail "get value of ${exp} (timeout)"
+	}
+    }
+    return ${val}
+}
+
+proc get_sizeof { type default } {
+    return [get_valueof "/d" "sizeof (${type})" $default]
+}
+


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

* RE: small test suite cleanup
  2009-02-13 16:36 FYI: small test suite cleanup Tom Tromey
@ 2009-02-13 16:57 ` Pierre Muller
  2009-02-13 18:42   ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Muller @ 2009-02-13 16:57 UTC (permalink / raw)
  To: tromey, gdb-patches

 I am just surprised by the regular expression used for
the matching of the result...
 
 This only accepts digits, but
if you use "/x" for the format,
you would get an hexadecimal printout,
shouldn't that be also accepted?

 Given the very general name of the proc: "get_valueof"
I would have expected it to support any format and
accept any output, even complicated ones.
  But then we could run into problems
of the correct regexp to delimit the return value
(especially because the final newline before 
gdb_prompt needs to be rejected, and this one is
quite system dependent...)

  Another option would be to rename you proc to
get_numeric_valueof and accepted only number
in binary, octal, decimal and hexadecimal forms...

  But I don't like the idea of having a
procedure that would issue FAIL
if used for instance as
  [get_valueof "/s" "*args.argv" "0"]
in gdb main function.

  By the way, the third argument should probably
be optional with a default "0", no?

Pierre Muller
Pascal language support maintainer for GDB




 

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : Friday, February 13, 2009 5:13 PM
> À : gdb-patches@sourceware.org
> Objet : FYI: small test suite cleanup
> 
> I needed get_sizeof for the charset patch, and while looking I found
> multiple copies of this in the testsuite.
> 
> This patch consolidates most of them -- I left a get_valueofx in
> pc-fp.exp.
> 
> Built and regtested on x86-64 (compile farm).
> 
> Tom
> 
> 2009-02-13  Tom Tromey  <tromey@redhat.com>
> 
> 	* gdb.base/remote.exp (get_sizeof): Remove.
> 	* gdb.base/long_long.exp (get_valueof, get_sizeof): Remove.
> 	* gdb.base/dfp-test.exp (get_valueof, get_sizeof): Remove.
> 	* gdb.base/sizeof.exp (get_valueof, get_sizeof): Remove.
> 	* lib/gdb.exp (get_valueof): Move from long_long.exp.
> 	(get_sizeof): Likewise.
> 
> diff --git a/gdb/testsuite/gdb.base/dfp-test.exp
> b/gdb/testsuite/gdb.base/dfp-test.exp
> index 32f36a9..94fcb41 100644
> --- a/gdb/testsuite/gdb.base/dfp-test.exp
> +++ b/gdb/testsuite/gdb.base/dfp-test.exp
> @@ -43,26 +43,6 @@ if ![runto_main] then {
>      continue
>  }
> 
> -# Detect the size of the target's basic types (from
> gdb.base/long_long.exp).
> -
> -proc get_valueof { fmt exp default } {
> -    global gdb_prompt
> -    send_gdb "print${fmt} ${exp}\n"
> -    gdb_expect {
> -	-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
> -	    set val $expect_out(1,string)
> -	}
> -	timeout {
> -	    set val ${default}
> -	}
> -    }
> -    return ${val}
> -}
> -
> -proc get_sizeof { type default } {
> -    return [get_valueof "/d" "sizeof (${type})" $default]
> -}
> -
>  set sizeof_long [get_sizeof "long" 4]
> 
>  proc d32_set_tests {} {
> diff --git a/gdb/testsuite/gdb.base/long_long.exp
> b/gdb/testsuite/gdb.base/long_long.exp
> index e585396..d0ad5ba 100644
> --- a/gdb/testsuite/gdb.base/long_long.exp
> +++ b/gdb/testsuite/gdb.base/long_long.exp
> @@ -74,26 +74,6 @@ gdb_expect {
> 
>  # Detect the size of the target's basic types.
> 
> -proc get_valueof { fmt exp default } {
> -    global gdb_prompt
> -    send_gdb "print${fmt} ${exp}\n"
> -    gdb_expect {
> -	-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
> -	    set val $expect_out(1,string)
> -	    pass "get value of ${exp} ($val)"
> -	}
> -	timeout {
> -	    set size ${default}
> -	    fail "get value of ${exp} (timeout)"
> -	}
> -    }
> -    return ${val}
> -}
> -
> -proc get_sizeof { type default } {
> -    return [get_valueof "/d" "sizeof (${type})" $default]
> -}
> -
>  set sizeof_char [get_sizeof "char" 1]
>  set sizeof_short [get_sizeof "short" 2]
>  set sizeof_int [get_sizeof "int" 4]
> diff --git a/gdb/testsuite/gdb.base/remote.exp
> b/gdb/testsuite/gdb.base/remote.exp
> index 0dee13a..113c56b 100644
> --- a/gdb/testsuite/gdb.base/remote.exp
> +++ b/gdb/testsuite/gdb.base/remote.exp
> @@ -125,22 +125,6 @@ gdb_load_timed $binfile "limit" 0
>  # Query GDB for the size of various types
>  #
> 
> -proc get_sizeof { type default } {
> -    global gdb_prompt
> -    send_gdb "print/d sizeof (${type})\n"
> -    gdb_expect {
> -	-re "\\$\[0-9\]* = (\[0-9\]*).*$gdb_prompt $" {
> -	    set size $expect_out(1,string)
> -	    pass "get sizeof ${type} ($size)"
> -	}
> -	timeout {
> -	    set size ${default}
> -	    fail "get sizeof ${type} (timeout)"
> -	}
> -    }
> -    return ${size}
> -}
> -
>  # Get the size of random_data table (defaults to 48K).
>  set sizeof_random_data [get_sizeof "random_data" 48*1024]
> 
> diff --git a/gdb/testsuite/gdb.base/sizeof.exp
> b/gdb/testsuite/gdb.base/sizeof.exp
> index 61a6be3..82f0da2 100644
> --- a/gdb/testsuite/gdb.base/sizeof.exp
> +++ b/gdb/testsuite/gdb.base/sizeof.exp
> @@ -61,24 +61,6 @@ if ![runto_main] then {
>  # Query GDB for the size of various types
>  #
> 
> -proc get_valueof { fmt exp default } {
> -    global gdb_prompt
> -
> -    set test "get valueof \"${exp}\""
> -    set val ${default}
> -    gdb_test_multiple "print${fmt} ${exp}" "$test" {
> -	-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
> -	    set val $expect_out(1,string)
> -	    pass "$test ($val)"
> -	}
> -    }
> -    return ${val}
> -}
> -
> -proc get_sizeof { type default } {
> -    return [get_valueof "/d" "sizeof (${type})" $default]
> -}
> -
>  gdb_test "next"
> 
>  set sizeof_char [get_sizeof "char" 1]
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index b0059b7..e329b96 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -2878,3 +2878,26 @@ proc prepare_for_testing { testname executable
> {sources ""} {options {debug}}} {
> 
>      return 0
>  }
> +
> +proc get_valueof { fmt exp default } {
> +    global gdb_prompt
> +
> +    set test "get valueof \"${exp}\""
> +    set val ${default}
> +    gdb_test_multiple "print${fmt} ${exp}" "$test" {
> +	-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
> +	    set val $expect_out(1,string)
> +	    pass "$test ($val)"
> +	}
> +	timeout {
> +	    set size ${default}
> +	    fail "get value of ${exp} (timeout)"
> +	}
> +    }
> +    return ${val}
> +}
> +
> +proc get_sizeof { type default } {
> +    return [get_valueof "/d" "sizeof (${type})" $default]
> +}
> +


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

* Re: small test suite cleanup
  2009-02-13 16:57 ` Pierre Muller
@ 2009-02-13 18:42   ` Tom Tromey
  2009-02-13 23:16     ` Pierre Muller
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2009-02-13 18:42 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

>>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:

Pierre>  This only accepts digits, but
Pierre> if you use "/x" for the format,
Pierre> you would get an hexadecimal printout,
Pierre> shouldn't that be also accepted?

Sure.  BTW, get_valueofx is another copy of it that is specific to the
/x format.

I did not try to fix bugs in this proc, I just consolidated the
various instances of it.

Pierre>   But I don't like the idea of having a
Pierre> procedure that would issue FAIL
Pierre> if used for instance as
Pierre>   [get_valueof "/s" "*args.argv" "0"]
Pierre> in gdb main function.

Are you saying you object to this patch?
If so, let me know, and I will revert it.

I'm not planning to fix any of the problems with the current
get_valueof.  My view is that this patch is an improvement simply
because it removes code duplication; whatever latent problems there
are were already there.  But, feel free to send a patch to fix any or
all of the problems you identified :-)

Tom


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

* RE: small test suite cleanup
  2009-02-13 18:42   ` Tom Tromey
@ 2009-02-13 23:16     ` Pierre Muller
  2009-02-13 23:38       ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Muller @ 2009-02-13 23:16 UTC (permalink / raw)
  To: tromey; +Cc: gdb-patches

  After some discussion with Tom on IRC,
I came up with this proposal:

I changed   get_valueof proc to accept
anything as a return value and
added a new get_integer_valueof proc
that has no format parameter and
uses "print /d $exp".

gdb/testsuite/ChangeLog entry:


2009-02-13  Pierre Muller  <muller@ics.u-strasbg.fr>

	* lib/gdb.exp (get_valueof): Accept anything as a return value.
	(get_integer_valueof): New procedure.
	(get_sizeof): Use new get_integer_value_of.
	* gdb.base/sizeof.exp: Replace all uses of get_valueof
	by get_integer_valueof.


Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.110
diff -u -p -r1.110 gdb.exp
--- lib/gdb.exp 13 Feb 2009 16:13:47 -0000      1.110
+++ lib/gdb.exp 13 Feb 2009 22:45:59 -0000
@@ -2885,19 +2885,36 @@ proc get_valueof { fmt exp default } {
     set test "get valueof \"${exp}\""
     set val ${default}
     gdb_test_multiple "print${fmt} ${exp}" "$test" {
+       -re "\\$\[0-9\]* = (.*)\[\r\n\]*$gdb_prompt $" {
+           set val $expect_out(1,string)
+           pass "$test ($val)"
+       }
+       timeout {
+           fail "get value of ${exp} (timeout)"
+       }
+    }
+    return ${val}
+}
+
+proc get_integer_valueof { exp default } {
+    global gdb_prompt
+
+    set test "get integer valueof \"${exp}\""
+    set val ${default}
+    gdb_test_multiple "print /d ${exp}" "$test" {
        -re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
            set val $expect_out(1,string)
            pass "$test ($val)"
        }
        timeout {
-           set size ${default}
            fail "get value of ${exp} (timeout)"
        }
     }
     return ${val}
 }

+
 proc get_sizeof { type default } {
-    return [get_valueof "/d" "sizeof (${type})" $default]
+    return [get_integer_valueof "sizeof (${type})" $default]
 }

Index: gdb.base/sizeof.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sizeof.exp,v
retrieving revision 1.14
diff -u -p -r1.14 sizeof.exp
--- gdb.base/sizeof.exp 13 Feb 2009 16:13:47 -0000      1.14
+++ gdb.base/sizeof.exp 13 Feb 2009 22:45:59 -0000
@@ -109,10 +109,10 @@ proc check_valueof { exp val } {

 # Check that GDB and the target agree over the sign of a character.

-set signof_byte [get_valueof "/d" "'\\377'" -1]
-set signof_char [get_valueof "/d" "(int) (char) -1" -1]
-set signof_signed_char [get_valueof "/d" "(int) (signed char) -1" -1]
-set signof_unsigned_char [get_valueof "/d" "(int) (unsigned char) -1" -1]
+set signof_byte [get_integer_valueof "'\\377'" -1]
+set signof_char [get_integer_valueof "(int) (char) -1" -1]
+set signof_signed_char [get_integer_valueof "(int) (signed char) -1" -1]
+set signof_unsigned_char [get_integer_valueof "(int) (unsigned char) -1"
-1]

 check_valueof "'\\377'" ${signof_byte}
 check_valueof "(int) (char) -1" ${signof_char}

 



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

* Re: small test suite cleanup
  2009-02-13 23:16     ` Pierre Muller
@ 2009-02-13 23:38       ` Tom Tromey
  2009-02-13 23:49         ` [Commit]: " Pierre Muller
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2009-02-13 23:38 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

>>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:

Pierre> I changed   get_valueof proc to accept
Pierre> anything as a return value and
Pierre> added a new get_integer_valueof proc
Pierre> that has no format parameter and
Pierre> uses "print /d $exp".

It looks pretty good, I have one nit.

Pierre> +proc get_integer_valueof { exp default } {
Pierre> +    global gdb_prompt
Pierre> +
Pierre> +    set test "get integer valueof \"${exp}\""
Pierre> +    set val ${default}
Pierre> +    gdb_test_multiple "print /d ${exp}" "$test" {
Pierre>         -re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
Pierre>             set val $expect_out(1,string)
Pierre>             pass "$test ($val)"
Pierre>         }
Pierre>         timeout {
Pierre> -           set size ${default}
Pierre>             fail "get value of ${exp} (timeout)"

This line should use $test.

This is ok with this change.

If you want to get rid of get_valueofx, and have the caller use
get_valueof, that would be fine by me.

thanks,
Tom


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

* [Commit]: small test suite cleanup
  2009-02-13 23:38       ` Tom Tromey
@ 2009-02-13 23:49         ` Pierre Muller
  0 siblings, 0 replies; 6+ messages in thread
From: Pierre Muller @ 2009-02-13 23:49 UTC (permalink / raw)
  To: 'Tom Tromey'; +Cc: gdb-patches

After Tom's approval,

this is what I finally committed



Pierre Muller
Pascal language support maintainer for GDB






2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
 
     * lib/gdb.exp (get_valueof): Accept anything as a return value.
      (get_integer_valueof): New procedure.
      (get_sizeof): Use new get_integer_value_of.
      * gdb.base/sizeof.exp: Replace all uses of get_valueof
      by get_integer_valueof.


$ cvs diff -up lib/gdb.exp gdb.base/sizeof.exp ChangeLog
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.110
diff -u -p -r1.110 gdb.exp
--- lib/gdb.exp 13 Feb 2009 16:13:47 -0000      1.110
+++ lib/gdb.exp 13 Feb 2009 23:34:28 -0000
@@ -2885,19 +2885,36 @@ proc get_valueof { fmt exp default } {
     set test "get valueof \"${exp}\""
     set val ${default}
     gdb_test_multiple "print${fmt} ${exp}" "$test" {
+       -re "\\$\[0-9\]* = (.*)\[\r\n\]*$gdb_prompt $" {
+           set val $expect_out(1,string)
+           pass "$test ($val)"
+       }
+       timeout {
+           fail "$test (timeout)"
+       }
+    }
+    return ${val}
+}
+
+proc get_integer_valueof { exp default } {
+    global gdb_prompt
+
+    set test "get integer valueof \"${exp}\""
+    set val ${default}
+    gdb_test_multiple "print /d ${exp}" "$test" {
        -re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
            set val $expect_out(1,string)
            pass "$test ($val)"
        }
        timeout {
-           set size ${default}
-           fail "get value of ${exp} (timeout)"
+           fail "$test (timeout)"
        }
     }
     return ${val}
 }

+
 proc get_sizeof { type default } {
-    return [get_valueof "/d" "sizeof (${type})" $default]
+    return [get_integer_valueof "sizeof (${type})" $default]
 }

Index: gdb.base/sizeof.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sizeof.exp,v
retrieving revision 1.14
diff -u -p -r1.14 sizeof.exp
--- gdb.base/sizeof.exp 13 Feb 2009 16:13:47 -0000      1.14
+++ gdb.base/sizeof.exp 13 Feb 2009 23:34:28 -0000
@@ -109,10 +109,10 @@ proc check_valueof { exp val } {

 # Check that GDB and the target agree over the sign of a character.

-set signof_byte [get_valueof "/d" "'\\377'" -1]
-set signof_char [get_valueof "/d" "(int) (char) -1" -1]
-set signof_signed_char [get_valueof "/d" "(int) (signed char) -1" -1]
-set signof_unsigned_char [get_valueof "/d" "(int) (unsigned char) -1" -1]
+set signof_byte [get_integer_valueof "'\\377'" -1]
+set signof_char [get_integer_valueof "(int) (char) -1" -1]
+set signof_signed_char [get_integer_valueof "(int) (signed char) -1" -1]
+set signof_unsigned_char [get_integer_valueof "(int) (unsigned char) -1"
-1]

 check_valueof "'\\377'" ${signof_byte}
 check_valueof "(int) (char) -1" ${signof_char}


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

end of thread, other threads:[~2009-02-13 23:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-13 16:36 FYI: small test suite cleanup Tom Tromey
2009-02-13 16:57 ` Pierre Muller
2009-02-13 18:42   ` Tom Tromey
2009-02-13 23:16     ` Pierre Muller
2009-02-13 23:38       ` Tom Tromey
2009-02-13 23:49         ` [Commit]: " Pierre Muller

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