This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFAv5 2/3] Test the convenience functions $_gdb_setting and $_gdb_int_setting.


The subject is stale -- it's $_gdb_setting / $_gdb_setting_str nowadays.

> +# Verifies that $_gdb_setting (SETTING) gives a value whose ptype matches EXPECTED.
> +proc check_type {setting expected} {
> +    with_test_prefix "check_type $setting $expected" {
> +	gdb_test "print \$_gdb_maint_setting(\"$setting\")"
> +	gdb_test "ptype $" "$expected"
> +    }
>  }
>  

I think it would still be good to add here:

 	gdb_test "ptype \$_gdb_maint_setting(\"$setting\")" \
            "type = int"

This is so if someone changes ptype of convenience
functions, maybe making it work for this case, the testcase makes
sure this case is inspected.

Otherwise this version LGTM.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]