Re: small test suite cleanup

Tom Tromey
2009-02-13T23:16:20Z

>>>>> "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