libusbgx: tests: Separate safe state initialization from tests
authorPawel Szewczyk <p.szewczyk@samsung.com>
Tue, 26 May 2015 08:04:41 +0000 (10:04 +0200)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 20:45:36 +0000 (21:45 +0100)
commit0e199f2f24575afeda597cba9d108f54e9d9e9d7
treecb1c094ebb2db6498bdc926c8524e3f484f267c1
parent5185f1aa828b9999fe6343dd195ffda90e0c7136
libusbgx: tests: Separate safe state initialization from tests

Test functions usually need to initialize usbg state before testing.
However, initialization may fail, causing test to finish immediatelly,
running teardown function.

This commit add function which takes care of state pointer when
initializing.

Change-Id: I797e56ac3cda67e871c6c4fbd2184220b05068f6
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
[Update description]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
tests/test.c
tests/usbg-test.c
tests/usbg-test.h