Changeset 3583ffb in mainline for uspace/lib/ui/test/window.c


Ignore:
Timestamp:
2020-11-08T19:51:04Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f93e4e3
Parents:
8c772c4
Message:

Revert "Create UI controls based on UI object…"

This was a mistake. Controls need ui_resource object, which must be
(at least currently) specific to a window and cannot be obtained from
ui_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/test/window.c

    r8c772c4 r3583ffb  
    3535#include <stdbool.h>
    3636#include <ui/control.h>
     37#include <ui/resource.h>
    3738#include <ui/ui.h>
    3839#include <ui/window.h>
     
    173174}
    174175
    175 /** ui_window_get_gc/rect() return valid objects */
    176 PCUT_TEST(gc_rect)
    177 {
    178         errno_t rc;
    179         ui_t *ui = NULL;
    180         ui_wnd_params_t params;
    181         ui_window_t *window = NULL;
     176/** ui_window_get_res/gc/rect() return valid objects */
     177PCUT_TEST(get_res_gc_rect)
     178{
     179        errno_t rc;
     180        ui_t *ui = NULL;
     181        ui_wnd_params_t params;
     182        ui_window_t *window = NULL;
     183        ui_resource_t *res;
    182184        gfx_context_t *gc;
    183185        gfx_rect_t rect;
     
    192194        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    193195        PCUT_ASSERT_NOT_NULL(window);
     196
     197        res = ui_window_get_res(window);
     198        PCUT_ASSERT_NOT_NULL(res);
    194199
    195200        gc = ui_window_get_gc(window);
Note: See TracChangeset for help on using the changeset viewer.