Ignore:
Timestamp:
2019-10-05T09:19:15Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
159776f
Parents:
6af4b4f
Message:

Need a few more tests for ds_display_t/ds_window_t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/test/display.c

    r6af4b4f rbef51cf  
    3333
    3434#include "../display.h"
     35#include "../window.h"
    3536
    3637PCUT_INIT;
     
    3940
    4041/** Display creation and destruction. */
    41 PCUT_TEST(display_basic)
     42PCUT_TEST(display_create_destroy)
    4243{
    4344        ds_display_t *disp;
     
    5051}
    5152
     53/** Basic window operation. */
     54PCUT_TEST(display_window)
     55{
     56        ds_display_t *disp;
     57        ds_window_t *wnd;
     58        ds_window_t *w0, *w1, *w2;
     59        errno_t rc;
     60
     61        rc = ds_display_create(&disp);
     62        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     63
     64        rc = ds_window_create(disp, &wnd);
     65        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     66
     67        w0 = ds_display_first_window(disp);
     68        PCUT_ASSERT_EQUALS(w0, wnd);
     69
     70        w1 = ds_display_next_window(w0);
     71        PCUT_ASSERT_NULL(w1);
     72
     73        w2 = ds_display_find_window(disp, wnd->id);
     74        PCUT_ASSERT_EQUALS(w2, wnd);
     75
     76        ds_window_delete(wnd);
     77        ds_display_destroy(disp);
     78}
     79
    5280PCUT_EXPORT(display);
Note: See TracChangeset for help on using the changeset viewer.