Changeset f2416ec3 in mainline for uspace/lib/ui/test/menuentry.c
- Timestamp:
- 2021-05-26T07:40:59Z (4 years ago)
- Children:
- 6baab83
- Parents:
- 344f8b9
- git-author:
- Jiri Svoboda <jiri@…> (2021-05-25 18:40:50)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-05-26 07:40:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/menuentry.c
r344f8b9 rf2416ec3 36 36 #include <ui/menubar.h> 37 37 #include <ui/menuentry.h> 38 #include <ui/resource.h>39 38 #include <ui/ui.h> 40 #include "../private/dummygc.h"39 #include <ui/window.h> 41 40 #include "../private/menuentry.h" 42 41 … … 54 53 PCUT_TEST(create_destroy) 55 54 { 56 dummy_gc_t *dgc; 57 gfx_context_t *gc; 58 ui_resource_t *resource = NULL; 59 ui_menu_bar_t *mbar = NULL; 60 ui_menu_t *menu = NULL; 61 ui_menu_entry_t *mentry = NULL; 62 errno_t rc; 63 64 rc = dummygc_create(&dgc); 65 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 66 67 gc = dummygc_get_ctx(dgc); 68 69 rc = ui_resource_create(gc, false, &resource); 70 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 71 PCUT_ASSERT_NOT_NULL(resource); 72 73 rc = ui_menu_bar_create(NULL, resource, &mbar); 55 ui_t *ui = NULL; 56 ui_window_t *window = NULL; 57 ui_wnd_params_t params; 58 ui_menu_bar_t *mbar = NULL; 59 ui_menu_t *menu = NULL; 60 ui_menu_entry_t *mentry = NULL; 61 errno_t rc; 62 63 rc = ui_create_disp(NULL, &ui); 64 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 65 66 ui_wnd_params_init(¶ms); 67 params.caption = "Hello"; 68 69 rc = ui_window_create(ui, ¶ms, &window); 70 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 71 PCUT_ASSERT_NOT_NULL(window); 72 73 rc = ui_menu_bar_create(ui, window, &mbar); 74 74 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 75 75 PCUT_ASSERT_NOT_NULL(mbar); … … 87 87 88 88 ui_menu_bar_destroy(mbar); 89 dummygc_destroy(dgc); 89 ui_window_destroy(window); 90 ui_destroy(ui); 90 91 } 91 92 … … 93 94 PCUT_TEST(create_sep_destroy) 94 95 { 95 dummy_gc_t *dgc; 96 gfx_context_t *gc; 97 ui_resource_t *resource = NULL; 98 ui_menu_bar_t *mbar = NULL; 99 ui_menu_t *menu = NULL; 100 ui_menu_entry_t *mentry = NULL; 101 errno_t rc; 102 103 rc = dummygc_create(&dgc); 104 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 105 106 gc = dummygc_get_ctx(dgc); 107 108 rc = ui_resource_create(gc, false, &resource); 109 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 110 PCUT_ASSERT_NOT_NULL(resource); 111 112 rc = ui_menu_bar_create(NULL, resource, &mbar); 96 ui_t *ui = NULL; 97 ui_window_t *window = NULL; 98 ui_wnd_params_t params; 99 ui_menu_bar_t *mbar = NULL; 100 ui_menu_t *menu = NULL; 101 ui_menu_entry_t *mentry = NULL; 102 errno_t rc; 103 104 rc = ui_create_disp(NULL, &ui); 105 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 106 107 ui_wnd_params_init(¶ms); 108 params.caption = "Hello"; 109 110 rc = ui_window_create(ui, ¶ms, &window); 111 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 112 PCUT_ASSERT_NOT_NULL(window); 113 114 rc = ui_menu_bar_create(ui, window, &mbar); 113 115 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 114 116 PCUT_ASSERT_NOT_NULL(mbar); … … 126 128 127 129 ui_menu_bar_destroy(mbar); 128 dummygc_destroy(dgc); 130 ui_window_destroy(window); 131 ui_destroy(ui); 129 132 } 130 133 … … 138 141 PCUT_TEST(set_cb) 139 142 { 140 dummy_gc_t *dgc;141 gfx_context_t *gc;142 ui_ resource_t *resource = NULL;143 ui_t *ui = NULL; 144 ui_window_t *window = NULL; 145 ui_wnd_params_t params; 143 146 ui_menu_bar_t *mbar = NULL; 144 147 ui_menu_t *menu = NULL; … … 147 150 errno_t rc; 148 151 149 rc = dummygc_create(&dgc); 150 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 151 152 gc = dummygc_get_ctx(dgc); 153 154 rc = ui_resource_create(gc, false, &resource); 155 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 156 PCUT_ASSERT_NOT_NULL(resource); 157 158 rc = ui_menu_bar_create(NULL, resource, &mbar); 152 rc = ui_create_disp(NULL, &ui); 153 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 154 155 ui_wnd_params_init(¶ms); 156 params.caption = "Hello"; 157 158 rc = ui_window_create(ui, ¶ms, &window); 159 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 160 PCUT_ASSERT_NOT_NULL(window); 161 162 rc = ui_menu_bar_create(ui, window, &mbar); 159 163 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 160 164 PCUT_ASSERT_NOT_NULL(mbar); … … 175 179 176 180 ui_menu_bar_destroy(mbar); 177 ui_ resource_destroy(resource);178 dummygc_destroy(dgc);181 ui_window_destroy(window); 182 ui_destroy(ui); 179 183 } 180 184 … … 182 186 PCUT_TEST(first_next) 183 187 { 184 dummy_gc_t *dgc;185 gfx_context_t *gc;186 ui_ resource_t *resource = NULL;188 ui_t *ui = NULL; 189 ui_window_t *window = NULL; 190 ui_wnd_params_t params; 187 191 ui_menu_bar_t *mbar = NULL; 188 192 ui_menu_t *menu = NULL; … … 192 196 errno_t rc; 193 197 194 rc = dummygc_create(&dgc); 195 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 196 197 gc = dummygc_get_ctx(dgc); 198 199 rc = ui_resource_create(gc, false, &resource); 200 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 201 PCUT_ASSERT_NOT_NULL(resource); 202 203 rc = ui_menu_bar_create(NULL, resource, &mbar); 198 rc = ui_create_disp(NULL, &ui); 199 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 200 201 ui_wnd_params_init(¶ms); 202 params.caption = "Hello"; 203 204 rc = ui_window_create(ui, ¶ms, &window); 205 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 206 PCUT_ASSERT_NOT_NULL(window); 207 208 rc = ui_menu_bar_create(ui, window, &mbar); 204 209 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 205 210 PCUT_ASSERT_NOT_NULL(mbar); … … 227 232 228 233 ui_menu_bar_destroy(mbar); 229 ui_ resource_destroy(resource);230 dummygc_destroy(dgc);231 } 232 233 /** ui_menu_entry_ widths() / ui_menu_entry_height() */234 ui_window_destroy(window); 235 ui_destroy(ui); 236 } 237 238 /** ui_menu_entry_column_widths() / ui_menu_entry_height() */ 234 239 PCUT_TEST(widths_height) 235 240 { 236 dummy_gc_t *dgc;237 gfx_context_t *gc;238 ui_ resource_t *resource = NULL;241 ui_t *ui = NULL; 242 ui_window_t *window = NULL; 243 ui_wnd_params_t params; 239 244 ui_menu_bar_t *mbar = NULL; 240 245 ui_menu_t *menu = NULL; … … 246 251 errno_t rc; 247 252 248 rc = dummygc_create(&dgc); 249 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 250 251 gc = dummygc_get_ctx(dgc); 252 253 rc = ui_resource_create(gc, false, &resource); 254 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 255 PCUT_ASSERT_NOT_NULL(resource); 256 257 rc = ui_menu_bar_create(NULL, resource, &mbar); 253 rc = ui_create_disp(NULL, &ui); 254 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 255 256 ui_wnd_params_init(¶ms); 257 params.caption = "Hello"; 258 259 rc = ui_window_create(ui, ¶ms, &window); 260 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 261 PCUT_ASSERT_NOT_NULL(window); 262 263 rc = ui_menu_bar_create(ui, window, &mbar); 258 264 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 259 265 PCUT_ASSERT_NOT_NULL(mbar); … … 278 284 279 285 ui_menu_bar_destroy(mbar); 280 ui_ resource_destroy(resource);281 dummygc_destroy(dgc);286 ui_window_destroy(window); 287 ui_destroy(ui); 282 288 } 283 289 … … 285 291 PCUT_TEST(paint) 286 292 { 287 dummy_gc_t *dgc; 288 gfx_context_t *gc; 289 ui_t *ui = NULL; 290 ui_resource_t *resource = NULL; 293 ui_t *ui = NULL; 294 ui_window_t *window = NULL; 295 ui_wnd_params_t params; 291 296 ui_menu_bar_t *mbar = NULL; 292 297 ui_menu_t *menu = NULL; … … 296 301 errno_t rc; 297 302 298 rc = dummygc_create(&dgc); 299 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 300 301 gc = dummygc_get_ctx(dgc); 302 303 rc = ui_create_disp(NULL, &ui); 304 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 305 306 rc = ui_resource_create(gc, false, &resource); 307 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 308 PCUT_ASSERT_NOT_NULL(resource); 309 310 rc = ui_menu_bar_create(ui, resource, &mbar); 303 rc = ui_create_disp(NULL, &ui); 304 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 305 306 ui_wnd_params_init(¶ms); 307 params.caption = "Hello"; 308 309 rc = ui_window_create(ui, ¶ms, &window); 310 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 311 PCUT_ASSERT_NOT_NULL(window); 312 313 rc = ui_menu_bar_create(ui, window, &mbar); 311 314 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 312 315 PCUT_ASSERT_NOT_NULL(mbar); … … 334 337 335 338 ui_menu_bar_destroy(mbar); 336 ui_resource_destroy(resource); 337 ui_destroy(ui); 338 dummygc_destroy(dgc); 339 ui_window_destroy(window); 340 ui_destroy(ui); 339 341 } 340 342 … … 342 344 PCUT_TEST(press_release) 343 345 { 344 dummy_gc_t *dgc; 345 gfx_context_t *gc; 346 ui_t *ui = NULL; 347 ui_resource_t *resource = NULL; 346 ui_t *ui = NULL; 347 ui_window_t *window = NULL; 348 ui_wnd_params_t params; 348 349 ui_menu_bar_t *mbar = NULL; 349 350 ui_menu_t *menu = NULL; … … 354 355 errno_t rc; 355 356 356 rc = dummygc_create(&dgc); 357 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 358 359 gc = dummygc_get_ctx(dgc); 360 361 rc = ui_create_disp(NULL, &ui); 362 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 363 364 rc = ui_resource_create(gc, false, &resource); 365 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 366 PCUT_ASSERT_NOT_NULL(resource); 367 368 rc = ui_menu_bar_create(ui, resource, &mbar); 357 rc = ui_create_disp(NULL, &ui); 358 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 359 360 ui_wnd_params_init(¶ms); 361 params.caption = "Hello"; 362 363 rc = ui_window_create(ui, ¶ms, &window); 364 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 365 PCUT_ASSERT_NOT_NULL(window); 366 367 rc = ui_menu_bar_create(ui, window, &mbar); 369 368 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 370 369 PCUT_ASSERT_NOT_NULL(mbar); … … 401 400 402 401 ui_menu_bar_destroy(mbar); 403 ui_resource_destroy(resource); 404 ui_destroy(ui); 405 dummygc_destroy(dgc); 402 ui_window_destroy(window); 403 ui_destroy(ui); 406 404 } 407 405 … … 409 407 PCUT_TEST(press_leave_release) 410 408 { 411 dummy_gc_t *dgc; 412 gfx_context_t *gc; 413 ui_t *ui = NULL; 414 ui_resource_t *resource = NULL; 409 ui_t *ui = NULL; 410 ui_window_t *window = NULL; 411 ui_wnd_params_t params; 415 412 ui_menu_bar_t *mbar = NULL; 416 413 ui_menu_t *menu = NULL; … … 421 418 errno_t rc; 422 419 423 rc = dummygc_create(&dgc); 424 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 425 426 gc = dummygc_get_ctx(dgc); 427 428 rc = ui_create_disp(NULL, &ui); 429 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 430 431 rc = ui_resource_create(gc, false, &resource); 432 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 433 PCUT_ASSERT_NOT_NULL(resource); 434 435 rc = ui_menu_bar_create(ui, resource, &mbar); 420 rc = ui_create_disp(NULL, &ui); 421 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 422 423 ui_wnd_params_init(¶ms); 424 params.caption = "Hello"; 425 426 rc = ui_window_create(ui, ¶ms, &window); 427 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 428 PCUT_ASSERT_NOT_NULL(window); 429 430 rc = ui_menu_bar_create(ui, window, &mbar); 436 431 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 437 432 PCUT_ASSERT_NOT_NULL(mbar); … … 473 468 474 469 ui_menu_bar_destroy(mbar); 475 ui_resource_destroy(resource); 476 ui_destroy(ui); 477 dummygc_destroy(dgc); 470 ui_window_destroy(window); 471 ui_destroy(ui); 478 472 } 479 473 … … 481 475 PCUT_TEST(press_leave_enter_release) 482 476 { 483 dummy_gc_t *dgc; 484 gfx_context_t *gc; 485 ui_t *ui = NULL; 486 ui_resource_t *resource = NULL; 477 ui_t *ui = NULL; 478 ui_window_t *window = NULL; 479 ui_wnd_params_t params; 487 480 ui_menu_bar_t *mbar = NULL; 488 481 ui_menu_t *menu = NULL; … … 493 486 errno_t rc; 494 487 495 rc = dummygc_create(&dgc); 496 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 497 498 gc = dummygc_get_ctx(dgc); 499 500 rc = ui_create_disp(NULL, &ui); 501 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 502 503 rc = ui_resource_create(gc, false, &resource); 504 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 505 PCUT_ASSERT_NOT_NULL(resource); 506 507 rc = ui_menu_bar_create(ui, resource, &mbar); 488 rc = ui_create_disp(NULL, &ui); 489 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 490 491 ui_wnd_params_init(¶ms); 492 params.caption = "Hello"; 493 494 rc = ui_window_create(ui, ¶ms, &window); 495 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 496 PCUT_ASSERT_NOT_NULL(window); 497 498 rc = ui_menu_bar_create(ui, window, &mbar); 508 499 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 509 500 PCUT_ASSERT_NOT_NULL(mbar); … … 550 541 551 542 ui_menu_bar_destroy(mbar); 552 ui_resource_destroy(resource); 553 ui_destroy(ui); 554 dummygc_destroy(dgc); 543 ui_window_destroy(window); 544 ui_destroy(ui); 555 545 } 556 546 … … 558 548 PCUT_TEST(pos_press_inside) 559 549 { 560 dummy_gc_t *dgc; 561 gfx_context_t *gc; 562 ui_t *ui = NULL; 563 ui_resource_t *resource = NULL; 550 ui_t *ui = NULL; 551 ui_window_t *window = NULL; 552 ui_wnd_params_t params; 564 553 ui_menu_bar_t *mbar = NULL; 565 554 ui_menu_t *menu = NULL; … … 570 559 errno_t rc; 571 560 572 rc = dummygc_create(&dgc); 573 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 574 575 gc = dummygc_get_ctx(dgc); 576 577 rc = ui_create_disp(NULL, &ui); 578 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 579 580 rc = ui_resource_create(gc, false, &resource); 581 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 582 PCUT_ASSERT_NOT_NULL(resource); 583 584 rc = ui_menu_bar_create(ui, resource, &mbar); 561 rc = ui_create_disp(NULL, &ui); 562 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 563 564 ui_wnd_params_init(¶ms); 565 params.caption = "Hello"; 566 567 rc = ui_window_create(ui, ¶ms, &window); 568 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 569 PCUT_ASSERT_NOT_NULL(window); 570 571 rc = ui_menu_bar_create(ui, window, &mbar); 585 572 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 586 573 PCUT_ASSERT_NOT_NULL(mbar); … … 614 601 615 602 ui_menu_bar_destroy(mbar); 616 ui_resource_destroy(resource); 617 ui_destroy(ui); 618 dummygc_destroy(dgc); 603 ui_window_destroy(window); 604 ui_destroy(ui); 619 605 } 620 606 … … 622 608 PCUT_TEST(pos_press_outside) 623 609 { 624 dummy_gc_t *dgc; 625 gfx_context_t *gc; 626 ui_t *ui = NULL; 627 ui_resource_t *resource = NULL; 610 ui_t *ui = NULL; 611 ui_window_t *window = NULL; 612 ui_wnd_params_t params; 628 613 ui_menu_bar_t *mbar = NULL; 629 614 ui_menu_t *menu = NULL; … … 634 619 errno_t rc; 635 620 636 rc = dummygc_create(&dgc); 637 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 638 639 gc = dummygc_get_ctx(dgc); 640 641 rc = ui_create_disp(NULL, &ui); 642 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 643 644 rc = ui_resource_create(gc, false, &resource); 645 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 646 PCUT_ASSERT_NOT_NULL(resource); 647 648 rc = ui_menu_bar_create(ui, resource, &mbar); 621 rc = ui_create_disp(NULL, &ui); 622 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 623 624 ui_wnd_params_init(¶ms); 625 params.caption = "Hello"; 626 627 rc = ui_window_create(ui, ¶ms, &window); 628 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 629 PCUT_ASSERT_NOT_NULL(window); 630 631 rc = ui_menu_bar_create(ui, window, &mbar); 649 632 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 650 633 PCUT_ASSERT_NOT_NULL(mbar); … … 678 661 679 662 ui_menu_bar_destroy(mbar); 680 ui_resource_destroy(resource); 681 ui_destroy(ui); 682 dummygc_destroy(dgc); 663 ui_window_destroy(window); 664 ui_destroy(ui); 683 665 } 684 666 … … 686 668 PCUT_TEST(pos_move_out) 687 669 { 688 dummy_gc_t *dgc; 689 gfx_context_t *gc; 690 ui_t *ui = NULL; 691 ui_resource_t *resource = NULL; 670 ui_t *ui = NULL; 671 ui_window_t *window = NULL; 672 ui_wnd_params_t params; 692 673 ui_menu_bar_t *mbar = NULL; 693 674 ui_menu_t *menu = NULL; … … 698 679 errno_t rc; 699 680 700 rc = dummygc_create(&dgc); 701 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 702 703 gc = dummygc_get_ctx(dgc); 704 705 rc = ui_create_disp(NULL, &ui); 706 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 707 708 rc = ui_resource_create(gc, false, &resource); 709 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 710 PCUT_ASSERT_NOT_NULL(resource); 711 712 rc = ui_menu_bar_create(ui, resource, &mbar); 681 rc = ui_create_disp(NULL, &ui); 682 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 683 684 ui_wnd_params_init(¶ms); 685 params.caption = "Hello"; 686 687 rc = ui_window_create(ui, ¶ms, &window); 688 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 689 PCUT_ASSERT_NOT_NULL(window); 690 691 rc = ui_menu_bar_create(ui, window, &mbar); 713 692 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 714 693 PCUT_ASSERT_NOT_NULL(mbar); … … 745 724 746 725 ui_menu_bar_destroy(mbar); 747 ui_resource_destroy(resource); 748 ui_destroy(ui); 749 dummygc_destroy(dgc); 726 ui_window_destroy(window); 727 ui_destroy(ui); 750 728 } 751 729 … … 753 731 PCUT_TEST(pos_move_in) 754 732 { 755 dummy_gc_t *dgc; 756 gfx_context_t *gc; 757 ui_t *ui = NULL; 758 ui_resource_t *resource = NULL; 733 ui_t *ui = NULL; 734 ui_window_t *window = NULL; 735 ui_wnd_params_t params; 759 736 ui_menu_bar_t *mbar = NULL; 760 737 ui_menu_t *menu = NULL; … … 765 742 errno_t rc; 766 743 767 rc = dummygc_create(&dgc); 768 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 769 770 gc = dummygc_get_ctx(dgc); 771 772 rc = ui_create_disp(NULL, &ui); 773 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 774 775 rc = ui_resource_create(gc, false, &resource); 776 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 777 PCUT_ASSERT_NOT_NULL(resource); 778 779 rc = ui_menu_bar_create(ui, resource, &mbar); 744 rc = ui_create_disp(NULL, &ui); 745 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 746 747 ui_wnd_params_init(¶ms); 748 params.caption = "Hello"; 749 750 rc = ui_window_create(ui, ¶ms, &window); 751 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 752 PCUT_ASSERT_NOT_NULL(window); 753 754 rc = ui_menu_bar_create(ui, window, &mbar); 780 755 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 781 756 PCUT_ASSERT_NOT_NULL(mbar); … … 809 784 810 785 ui_menu_bar_destroy(mbar); 811 ui_resource_destroy(resource); 812 ui_destroy(ui); 813 dummygc_destroy(dgc); 786 ui_window_destroy(window); 787 ui_destroy(ui); 814 788 } 815 789
Note:
See TracChangeset
for help on using the changeset viewer.