Changes in uspace/srv/hid/display/test/window.c [6828a56:dd7df1c] in mainline
- File:
-
- 1 edited
-
uspace/srv/hid/display/test/window.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/test/window.c
r6828a56 rdd7df1c 1109 1109 PCUT_ASSERT_EQUALS(wnd->display->cursor[dcurs_arrow], wnd->cursor); 1110 1110 1111 // Check that invalid cursors cannot be set: ignore enum conversions 1112 // as we are out-of-bounds 1113 #pragma GCC diagnostic push 1114 #if defined(__GNUC__) && (__GNUC__ >= 10) 1115 #pragma GCC diagnostic ignored "-Wenum-conversion" 1116 #endif 1111 1117 rc = ds_window_set_cursor(wnd, dcurs_limit); 1112 1118 PCUT_ASSERT_ERRNO_VAL(EINVAL, rc); … … 1116 1122 PCUT_ASSERT_ERRNO_VAL(EINVAL, rc); 1117 1123 PCUT_ASSERT_EQUALS(wnd->display->cursor[dcurs_arrow], wnd->cursor); 1124 #pragma GCC diagnostic pop 1118 1125 1119 1126 rc = ds_window_set_cursor(wnd, dcurs_size_lr); … … 1169 1176 } 1170 1177 1171 /** ds_window_find_ alt() finds alternatewindow by flags */1172 PCUT_TEST(window_find_ alt)1178 /** ds_window_find_next() finds next window by flags */ 1179 PCUT_TEST(window_find_next) 1173 1180 { 1174 1181 gfx_context_t *gc; … … 1210 1217 w2->flags |= wndf_system; 1211 1218 1212 wnd = ds_window_find_ alt(w0, wndf_minimized);1219 wnd = ds_window_find_next(w0, wndf_minimized); 1213 1220 PCUT_ASSERT_EQUALS(w1, wnd); 1214 1221 1215 wnd = ds_window_find_ alt(w0, wndf_system);1222 wnd = ds_window_find_next(w0, wndf_system); 1216 1223 PCUT_ASSERT_EQUALS(w2, wnd); 1217 1224 1218 wnd = ds_window_find_alt(w0, wndf_maximized); 1225 wnd = ds_window_find_next(w0, wndf_maximized); 1226 PCUT_ASSERT_NULL(wnd); 1227 1228 ds_window_destroy(w0); 1229 ds_window_destroy(w1); 1230 ds_window_destroy(w2); 1231 ds_seat_destroy(seat); 1232 ds_client_destroy(client); 1233 ds_display_destroy(disp); 1234 } 1235 1236 /** ds_window_find_prev() finds previous window by flags */ 1237 PCUT_TEST(window_find_prev) 1238 { 1239 gfx_context_t *gc; 1240 ds_display_t *disp; 1241 ds_client_t *client; 1242 ds_seat_t *seat; 1243 ds_window_t *w0; 1244 ds_window_t *w1; 1245 ds_window_t *w2; 1246 ds_window_t *wnd; 1247 display_wnd_params_t params; 1248 errno_t rc; 1249 1250 rc = gfx_context_new(&dummy_ops, NULL, &gc); 1251 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1252 1253 rc = ds_display_create(gc, df_none, &disp); 1254 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1255 1256 rc = ds_client_create(disp, NULL, NULL, &client); 1257 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1258 1259 rc = ds_seat_create(disp, "Alice", &seat); 1260 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1261 1262 display_wnd_params_init(¶ms); 1263 params.rect.p0.x = params.rect.p0.y = 0; 1264 params.rect.p1.x = params.rect.p1.y = 1; 1265 1266 rc = ds_window_create(client, ¶ms, &w2); 1267 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1268 w2->flags |= wndf_system; 1269 1270 rc = ds_window_create(client, ¶ms, &w1); 1271 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1272 w1->flags |= wndf_minimized; 1273 1274 rc = ds_window_create(client, ¶ms, &w0); 1275 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1276 1277 wnd = ds_window_find_prev(w0, wndf_minimized); 1278 PCUT_ASSERT_EQUALS(w1, wnd); 1279 1280 wnd = ds_window_find_prev(w0, wndf_system); 1281 PCUT_ASSERT_EQUALS(w2, wnd); 1282 1283 wnd = ds_window_find_prev(w0, wndf_maximized); 1219 1284 PCUT_ASSERT_NULL(wnd); 1220 1285
Note:
See TracChangeset
for help on using the changeset viewer.
