[sane-devel] [PATCH] [RFC] add sanei_usb test program
stef.dev at free.fr
Fri Mar 8 20:55:19 UTC 2013
On 06/03/2013 22:22, Stef wrote:
> On 06/03/2013 22:21, Stef wrote:
>> here is a patch that adds a sanei_usb_test program in a new
>> testsuite/sanei directory. This program tests these sanei_usb functions:
>> - sanei_usb_init()
>> - sanei_usb_open()
>> - sanei_usb_get_vendor_product_byname()
>> - sanei_usb_close()
>> - sanei_usb_exit()
>> It is compiled and run only when 'make tests' is ran in the new
>> subdirectory. It needs at least one USB scanner plugged. I'm using it
>> to check the changes I am currently doing in sanei_usb.c .
>> In the long term, I may even add use of umockdev (linux only) to
>> tests more things without need for actual scanner devices.
> with attachment this time!
I really think this test program should be added, it doesn't add
extra dependency and helps testing a lot. For instance while adding a
test case for the problem Olaf spotted (not setting usb context to
null), it allowed me to find I also forgot to reset device_number to 0
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sane-devel