Changeset f5191b4 in mainline


Ignore:
Timestamp:
2020-01-28T09:17:35Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4645b2c
Parents:
cc90846
git-author:
Jiri Svoboda <jiri@…> (2020-01-27 19:17:32)
git-committer:
Jiri Svoboda <jiri@…> (2020-01-28 09:17:35)
Message:

Fix unit test failures

Location:
uspace/srv/hid/display
Files:
4 edited

Legend:

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

    rcc90846 rf5191b4  
    463463
    464464        gc = ds_display_get_gc(disp); // XXX
     465        if (gc == NULL)
     466                return EOK;
    465467
    466468        rc = gfx_set_color(gc, disp->bg_color);
  • uspace/srv/hid/display/test/display.c

    rcc90846 rf5191b4  
    396396        PCUT_ASSERT_EQUALS(w1, seat->focus);
    397397
     398        event.type = PTD_RELEASE;
     399        event.btn_num = 1;
     400        rc = ds_display_post_ptd_event(disp, &event);
     401        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     402        PCUT_ASSERT_FALSE(called_cb);
     403
    398404        event.type = PTD_MOVE;
    399405        event.dmove.x = -400 + 10;
  • uspace/srv/hid/display/test/window.c

    rcc90846 rf5191b4  
    125125
    126126        PCUT_ASSERT_INT_EQUALS(dsw_moving, wnd->state);
    127         PCUT_ASSERT_INT_EQUALS(wnd->dpos.x, 0);
    128         PCUT_ASSERT_INT_EQUALS(wnd->dpos.y, 0);
     127        PCUT_ASSERT_INT_EQUALS(wnd->dpos.x, 1);
     128        PCUT_ASSERT_INT_EQUALS(wnd->dpos.y, 2);
    129129
    130130        event.type = POS_RELEASE;
  • uspace/srv/hid/display/window.c

    rcc90846 rf5191b4  
    301301                wnd->pixelmap.height = dims.y;
    302302                wnd->pixelmap.data = alloc.pixels;
    303         }
    304 
    305         if (wnd->pixelmap.data == NULL) {
    306                 rc = ENOMEM;
    307                 goto error;
     303
     304                if (wnd->pixelmap.data == NULL) {
     305                        rc = ENOMEM;
     306                        goto error;
     307                }
    308308        }
    309309
     
    382382        }
    383383
     384        /* This can happen in unit tests */
     385        if (wnd->bitmap == NULL)
     386                return EOK;
     387
    384388        return gfx_bitmap_render(wnd->bitmap, brect, &wnd->dpos);
    385389}
Note: See TracChangeset for help on using the changeset viewer.