On Mon, Mar 14, 2011 at 1:09 AM, Peter Hutterer
<peter.hutte...@who-t.net> wrote:
> On Fri, Mar 11, 2011 at 03:13:55PM -0800, Jason Gerecke wrote:
>> Some basic tests to ensure booleans and non-booleans act like we
>> want them to.
>>
>> Signed-off-by: Jason Gerecke <killert...@gmail.com>
>> ---
>>  tools/xsetwacom.c |   43 +++++++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 43 insertions(+), 0 deletions(-)
>>
>> diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
>> index d867982..f7b2e58 100644
>> --- a/tools/xsetwacom.c
>> +++ b/tools/xsetwacom.c
>> @@ -2238,6 +2238,48 @@ static void test_parameter_number(void)
>>       g_assert(ArrayLength(deprecated_parameters) == 16);
>>  }
>>
>> +static void test_convert_value_from_user(void)
>> +{
>> +     param_t test_nonbool =
>> +     {
>> +             .name = "Test",
>> +             .desc = "NOT A REAL PARAMETER",
>> +             .prop_flags = 0,
>> +     };
>> +
>> +     param_t test_bool =
>> +     {
>> +             .name = "Test",
>> +             .desc = "NOT A REAL PARAMETER",
>> +             .prop_flags = PROP_FLAG_BOOLEAN,
>> +     };
>> +
>> +     int *retval = calloc(1, sizeof(int));
>> +     if (!retval)
>> +     {
>> +             fprintf(stderr, "calloc failed\n");
>> +             exit(EXIT_FAILURE);
>> +     }
>
> hehe, Java coming though?  same as with the first patch, we can just use a
> normal integer and then use &retval;

Ohhhh, of course.  I was scratching my head why consistently doing
that.  I didn't get the java connection.

Chris

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to