]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: test: Add tests for get/find uclass devices
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Wed, 15 Apr 2015 11:07:20 +0000 (13:07 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 22 Apr 2015 17:03:14 +0000 (11:03 -0600)
commit9e85f13ddc47d253d90411a0645f9fbd8fa6e4b8
tree0a231cf9a2fe7c0d4f2053fb134c9c2b2301f41c
parent754e71e850cb09d53543846fbed74cc5a1491c76
dm: test: Add tests for get/find uclass devices

This commit introduces simple tests for functions:
- uclass_find_first_device()
- uclass_find_next_device()
- uclass_first_device()
- uclass_next_device()

Tests added by this commit:
- Test: dm_test_uclass_devices_find:
  * call uclass_find_first_device(), then check if: (dev != NULL), (ret == 0)
  * for the rest devices, call uclass_find_next_device() and do the same check

- Test: dm_test_uclass_devices_get:
  * call uclass_first_device(), then check if:
    -- (dev != NULL), (ret == 0), device_active()
  * for the rest devices, call uclass_next_device() and do the same check

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
test/dm/core.c