Changes in uspace/lib/ui/test/entry.c [db3895d:f0155e4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/entry.c
rdb3895d rf0155e4 27 27 */ 28 28 29 #include <clipboard.h> 29 30 #include <gfx/context.h> 30 31 #include <gfx/coord.h> … … 105 106 PCUT_TEST(set_halign) 106 107 { 107 ui_entry_t *entry; 108 errno_t rc; 109 110 rc = ui_entry_create(NULL, "Hello", &entry); 108 errno_t rc; 109 ui_t *ui = NULL; 110 ui_window_t *window = NULL; 111 ui_wnd_params_t params; 112 ui_entry_t *entry; 113 114 rc = ui_create_disp(NULL, &ui); 115 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 116 117 ui_wnd_params_init(¶ms); 118 params.caption = "Hello"; 119 120 rc = ui_window_create(ui, ¶ms, &window); 121 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 122 PCUT_ASSERT_NOT_NULL(window); 123 124 rc = ui_entry_create(window, "Hello", &entry); 111 125 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 112 126 … … 115 129 ui_entry_set_halign(entry, gfx_halign_center); 116 130 PCUT_ASSERT_EQUALS(gfx_halign_center, entry->halign); 131 132 ui_entry_destroy(entry); 133 ui_window_destroy(window); 134 ui_destroy(ui); 135 } 136 137 /** Set entry read only flag sets internal field */ 138 PCUT_TEST(set_read_only) 139 { 140 ui_entry_t *entry; 141 errno_t rc; 142 143 rc = ui_entry_create(NULL, "Hello", &entry); 144 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 145 146 ui_entry_set_read_only(entry, true); 147 PCUT_ASSERT_TRUE(entry->read_only); 148 ui_entry_set_read_only(entry, false); 149 PCUT_ASSERT_FALSE(entry->read_only); 117 150 118 151 ui_entry_destroy(entry); … … 173 206 } 174 207 208 /** ui_entry_delete_sel() deletes selected text */ 209 PCUT_TEST(delete_sel) 210 { 211 errno_t rc; 212 ui_t *ui = NULL; 213 ui_window_t *window = NULL; 214 ui_wnd_params_t params; 215 ui_entry_t *entry; 216 217 rc = ui_create_disp(NULL, &ui); 218 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 219 220 ui_wnd_params_init(¶ms); 221 params.caption = "Hello"; 222 223 rc = ui_window_create(ui, ¶ms, &window); 224 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 225 PCUT_ASSERT_NOT_NULL(window); 226 227 rc = ui_entry_create(window, "ABCDEF", &entry); 228 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 229 230 PCUT_ASSERT_STR_EQUALS("ABCDEF", entry->text); 231 232 ui_entry_activate(entry); 233 234 /* Select all but first and last character */ 235 ui_entry_seek_start(entry, false); 236 ui_entry_seek_next_char(entry, false); 237 ui_entry_seek_end(entry, true); 238 ui_entry_seek_prev_char(entry, true); 239 240 ui_entry_delete_sel(entry); 241 242 PCUT_ASSERT_STR_EQUALS("AF", entry->text); 243 244 ui_entry_destroy(entry); 245 ui_window_destroy(window); 246 ui_destroy(ui); 247 } 248 249 /** ui_entry_insert_str() inserts string at cursor. */ 250 PCUT_TEST(insert_str) 251 { 252 errno_t rc; 253 ui_t *ui = NULL; 254 ui_window_t *window = NULL; 255 ui_wnd_params_t params; 256 ui_entry_t *entry; 257 258 rc = ui_create_disp(NULL, &ui); 259 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 260 261 ui_wnd_params_init(¶ms); 262 params.caption = "Hello"; 263 264 rc = ui_window_create(ui, ¶ms, &window); 265 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 266 PCUT_ASSERT_NOT_NULL(window); 267 268 rc = ui_entry_create(window, "A", &entry); 269 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 270 271 PCUT_ASSERT_STR_EQUALS("A", entry->text); 272 273 ui_entry_activate(entry); 274 ui_entry_seek_end(entry, false); 275 276 rc = ui_entry_insert_str(entry, "B"); 277 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 278 279 PCUT_ASSERT_STR_EQUALS("AB", entry->text); 280 281 rc = ui_entry_insert_str(entry, "EF"); 282 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 283 284 PCUT_ASSERT_STR_EQUALS("ABEF", entry->text); 285 286 entry->pos = 2; 287 entry->sel_start = 2; 288 rc = ui_entry_insert_str(entry, "CD"); 289 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 290 291 PCUT_ASSERT_STR_EQUALS("ABCDEF", entry->text); 292 293 ui_entry_destroy(entry); 294 ui_window_destroy(window); 295 ui_destroy(ui); 296 } 297 298 /** ui_entry_insert_str() deletes selection before inserting string */ 299 PCUT_TEST(insert_str_with_sel) 300 { 301 errno_t rc; 302 ui_t *ui = NULL; 303 ui_window_t *window = NULL; 304 ui_wnd_params_t params; 305 ui_entry_t *entry; 306 307 rc = ui_create_disp(NULL, &ui); 308 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 309 310 ui_wnd_params_init(¶ms); 311 params.caption = "Hello"; 312 313 rc = ui_window_create(ui, ¶ms, &window); 314 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 315 PCUT_ASSERT_NOT_NULL(window); 316 317 rc = ui_entry_create(window, "ABCDE", &entry); 318 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 319 320 PCUT_ASSERT_STR_EQUALS("ABCDE", entry->text); 321 322 /* Select all but the first and last character */ 323 ui_entry_activate(entry); 324 ui_entry_seek_start(entry, false); 325 ui_entry_seek_next_char(entry, false); 326 ui_entry_seek_end(entry, true); 327 ui_entry_seek_prev_char(entry, true); 328 329 rc = ui_entry_insert_str(entry, "123"); 330 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 331 332 PCUT_ASSERT_STR_EQUALS("A123E", entry->text); 333 334 ui_entry_destroy(entry); 335 ui_window_destroy(window); 336 ui_destroy(ui); 337 } 338 339 /** ui_entry_backspace() deletes character before cursor. */ 340 PCUT_TEST(backspace) 341 { 342 errno_t rc; 343 ui_t *ui = NULL; 344 ui_window_t *window = NULL; 345 ui_wnd_params_t params; 346 ui_entry_t *entry; 347 348 rc = ui_create_disp(NULL, &ui); 349 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 350 351 ui_wnd_params_init(¶ms); 352 params.caption = "Hello"; 353 354 rc = ui_window_create(ui, ¶ms, &window); 355 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 356 PCUT_ASSERT_NOT_NULL(window); 357 358 rc = ui_entry_create(window, "ABCD", &entry); 359 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 360 361 PCUT_ASSERT_STR_EQUALS("ABCD", entry->text); 362 entry->pos = 3; 363 entry->sel_start = 3; 364 365 ui_entry_backspace(entry); 366 PCUT_ASSERT_STR_EQUALS("ABD", entry->text); 367 368 ui_entry_backspace(entry); 369 PCUT_ASSERT_STR_EQUALS("AD", entry->text); 370 371 ui_entry_backspace(entry); 372 PCUT_ASSERT_STR_EQUALS("D", entry->text); 373 374 ui_entry_backspace(entry); 375 PCUT_ASSERT_STR_EQUALS("D", entry->text); 376 377 ui_entry_destroy(entry); 378 ui_window_destroy(window); 379 ui_destroy(ui); 380 } 381 382 /** ui_entry_backspace() with selected text deletes selection. */ 383 PCUT_TEST(backspace_with_sel) 384 { 385 errno_t rc; 386 ui_t *ui = NULL; 387 ui_window_t *window = NULL; 388 ui_wnd_params_t params; 389 ui_entry_t *entry; 390 391 rc = ui_create_disp(NULL, &ui); 392 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 393 394 ui_wnd_params_init(¶ms); 395 params.caption = "Hello"; 396 397 rc = ui_window_create(ui, ¶ms, &window); 398 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 399 PCUT_ASSERT_NOT_NULL(window); 400 401 rc = ui_entry_create(window, "ABCDE", &entry); 402 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 403 404 PCUT_ASSERT_STR_EQUALS("ABCDE", entry->text); 405 406 /* Select all but the first and last character */ 407 ui_entry_activate(entry); 408 ui_entry_seek_start(entry, false); 409 ui_entry_seek_next_char(entry, false); 410 ui_entry_seek_end(entry, true); 411 ui_entry_seek_prev_char(entry, true); 412 413 ui_entry_backspace(entry); 414 415 PCUT_ASSERT_STR_EQUALS("AE", entry->text); 416 417 ui_entry_destroy(entry); 418 ui_window_destroy(window); 419 ui_destroy(ui); 420 } 421 422 /** ui_entry_delete() deletes character after cursor. */ 423 PCUT_TEST(delete) 424 { 425 errno_t rc; 426 ui_t *ui = NULL; 427 ui_window_t *window = NULL; 428 ui_wnd_params_t params; 429 ui_entry_t *entry; 430 431 rc = ui_create_disp(NULL, &ui); 432 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 433 434 ui_wnd_params_init(¶ms); 435 params.caption = "Hello"; 436 437 rc = ui_window_create(ui, ¶ms, &window); 438 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 439 PCUT_ASSERT_NOT_NULL(window); 440 441 rc = ui_entry_create(window, "ABCD", &entry); 442 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 443 444 PCUT_ASSERT_STR_EQUALS("ABCD", entry->text); 445 entry->pos = 1; 446 entry->sel_start = 1; 447 448 ui_entry_delete(entry); 449 PCUT_ASSERT_STR_EQUALS("ACD", entry->text); 450 451 ui_entry_delete(entry); 452 PCUT_ASSERT_STR_EQUALS("AD", entry->text); 453 454 ui_entry_delete(entry); 455 PCUT_ASSERT_STR_EQUALS("A", entry->text); 456 457 ui_entry_delete(entry); 458 PCUT_ASSERT_STR_EQUALS("A", entry->text); 459 460 ui_entry_destroy(entry); 461 ui_window_destroy(window); 462 ui_destroy(ui); 463 } 464 465 /** ui_entry_delete() with selected text deletes selection. */ 466 PCUT_TEST(delete_with_sel) 467 { 468 errno_t rc; 469 ui_t *ui = NULL; 470 ui_window_t *window = NULL; 471 ui_wnd_params_t params; 472 ui_entry_t *entry; 473 474 rc = ui_create_disp(NULL, &ui); 475 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 476 477 ui_wnd_params_init(¶ms); 478 params.caption = "Hello"; 479 480 rc = ui_window_create(ui, ¶ms, &window); 481 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 482 PCUT_ASSERT_NOT_NULL(window); 483 484 rc = ui_entry_create(window, "ABCDE", &entry); 485 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 486 487 PCUT_ASSERT_STR_EQUALS("ABCDE", entry->text); 488 489 /* Select all but the first and last character */ 490 ui_entry_activate(entry); 491 ui_entry_seek_start(entry, false); 492 ui_entry_seek_next_char(entry, false); 493 ui_entry_seek_end(entry, true); 494 ui_entry_seek_prev_char(entry, true); 495 496 ui_entry_delete(entry); 497 498 PCUT_ASSERT_STR_EQUALS("AE", entry->text); 499 500 ui_entry_destroy(entry); 501 ui_window_destroy(window); 502 ui_destroy(ui); 503 } 504 505 /** ui_entry_copy() copies selected text to clipboard. */ 506 PCUT_TEST(copy) 507 { 508 errno_t rc; 509 ui_t *ui = NULL; 510 ui_window_t *window = NULL; 511 ui_wnd_params_t params; 512 ui_entry_t *entry; 513 char *str; 514 515 rc = ui_create_disp(NULL, &ui); 516 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 517 518 ui_wnd_params_init(¶ms); 519 params.caption = "Hello"; 520 521 rc = ui_window_create(ui, ¶ms, &window); 522 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 523 PCUT_ASSERT_NOT_NULL(window); 524 525 rc = ui_entry_create(window, "ABCDEF", &entry); 526 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 527 528 ui_entry_activate(entry); 529 ui_entry_seek_start(entry, false); 530 ui_entry_seek_next_char(entry, false); 531 ui_entry_seek_end(entry, true); 532 ui_entry_seek_prev_char(entry, true); 533 534 // FIXME: This is not safe unless we could create a private 535 // test clipboard 536 537 ui_entry_copy(entry); 538 rc = clipboard_get_str(&str); 539 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 540 PCUT_ASSERT_STR_EQUALS("BCDE", str); 541 PCUT_ASSERT_STR_EQUALS("ABCDEF", entry->text); 542 free(str); 543 544 ui_entry_destroy(entry); 545 ui_window_destroy(window); 546 ui_destroy(ui); 547 } 548 549 /** ui_entry_cut() cuts selected text to clipboard. */ 550 PCUT_TEST(cut) 551 { 552 errno_t rc; 553 ui_t *ui = NULL; 554 ui_window_t *window = NULL; 555 ui_wnd_params_t params; 556 ui_entry_t *entry; 557 char *str; 558 559 rc = ui_create_disp(NULL, &ui); 560 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 561 562 ui_wnd_params_init(¶ms); 563 params.caption = "Hello"; 564 565 rc = ui_window_create(ui, ¶ms, &window); 566 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 567 PCUT_ASSERT_NOT_NULL(window); 568 569 rc = ui_entry_create(window, "ABCDEF", &entry); 570 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 571 572 ui_entry_activate(entry); 573 ui_entry_seek_start(entry, false); 574 ui_entry_seek_next_char(entry, false); 575 ui_entry_seek_end(entry, true); 576 ui_entry_seek_prev_char(entry, true); 577 578 // FIXME: This is not safe unless we could create a private 579 // test clipboard 580 581 ui_entry_cut(entry); 582 rc = clipboard_get_str(&str); 583 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 584 PCUT_ASSERT_STR_EQUALS("BCDE", str); 585 PCUT_ASSERT_STR_EQUALS("AF", entry->text); 586 free(str); 587 588 ui_entry_destroy(entry); 589 ui_window_destroy(window); 590 ui_destroy(ui); 591 } 592 593 /** ui_entry_paste() pastes text from clipboard. */ 594 PCUT_TEST(paste) 595 { 596 errno_t rc; 597 ui_t *ui = NULL; 598 ui_window_t *window = NULL; 599 ui_wnd_params_t params; 600 ui_entry_t *entry; 601 602 rc = ui_create_disp(NULL, &ui); 603 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 604 605 ui_wnd_params_init(¶ms); 606 params.caption = "Hello"; 607 608 rc = ui_window_create(ui, ¶ms, &window); 609 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 610 PCUT_ASSERT_NOT_NULL(window); 611 612 rc = ui_entry_create(window, "AB", &entry); 613 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 614 615 ui_entry_activate(entry); 616 ui_entry_seek_start(entry, false); 617 ui_entry_seek_next_char(entry, false); 618 619 // FIXME: This is not safe unless we could create a private 620 // test clipboard 621 622 rc = clipboard_put_str("123"); 623 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 624 625 ui_entry_paste(entry); 626 PCUT_ASSERT_STR_EQUALS("A123B", entry->text); 627 628 ui_entry_destroy(entry); 629 ui_window_destroy(window); 630 ui_destroy(ui); 631 } 632 633 /** ui_entry_seek_start() moves cursor to beginning of text */ 634 PCUT_TEST(seek_start) 635 { 636 errno_t rc; 637 ui_t *ui = NULL; 638 ui_window_t *window = NULL; 639 ui_wnd_params_t params; 640 ui_entry_t *entry; 641 642 rc = ui_create_disp(NULL, &ui); 643 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 644 645 ui_wnd_params_init(¶ms); 646 params.caption = "Hello"; 647 648 rc = ui_window_create(ui, ¶ms, &window); 649 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 650 PCUT_ASSERT_NOT_NULL(window); 651 652 rc = ui_entry_create(window, "ABCDEF", &entry); 653 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 654 655 ui_entry_activate(entry); 656 657 entry->pos = 2; 658 entry->sel_start = 2; 659 660 ui_entry_seek_start(entry, true); 661 PCUT_ASSERT_INT_EQUALS(0, entry->pos); 662 PCUT_ASSERT_INT_EQUALS(2, entry->sel_start); 663 664 ui_entry_seek_start(entry, false); 665 PCUT_ASSERT_INT_EQUALS(0, entry->pos); 666 PCUT_ASSERT_INT_EQUALS(0, entry->sel_start); 667 668 ui_entry_destroy(entry); 669 ui_window_destroy(window); 670 ui_destroy(ui); 671 } 672 673 /** ui_entry_seek_end() moves cursor to the end of text */ 674 PCUT_TEST(seek_end) 675 { 676 errno_t rc; 677 ui_t *ui = NULL; 678 ui_window_t *window = NULL; 679 ui_wnd_params_t params; 680 ui_entry_t *entry; 681 682 rc = ui_create_disp(NULL, &ui); 683 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 684 685 ui_wnd_params_init(¶ms); 686 params.caption = "Hello"; 687 688 rc = ui_window_create(ui, ¶ms, &window); 689 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 690 PCUT_ASSERT_NOT_NULL(window); 691 692 rc = ui_entry_create(window, "ABCD", &entry); 693 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 694 695 PCUT_ASSERT_STR_EQUALS("ABCD", entry->text); 696 entry->pos = 2; 697 entry->sel_start = 2; 698 699 ui_entry_seek_end(entry, true); 700 PCUT_ASSERT_INT_EQUALS(4, entry->pos); 701 PCUT_ASSERT_INT_EQUALS(2, entry->sel_start); 702 ui_entry_seek_end(entry, false); 703 PCUT_ASSERT_INT_EQUALS(4, entry->pos); 704 PCUT_ASSERT_INT_EQUALS(4, entry->sel_start); 705 706 ui_entry_destroy(entry); 707 ui_window_destroy(window); 708 ui_destroy(ui); 709 } 710 711 /** ui_entry_seek_prev_char() moves cursor to the previous character */ 712 PCUT_TEST(seek_prev_char) 713 { 714 errno_t rc; 715 ui_t *ui = NULL; 716 ui_window_t *window = NULL; 717 ui_wnd_params_t params; 718 ui_entry_t *entry; 719 720 rc = ui_create_disp(NULL, &ui); 721 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 722 723 ui_wnd_params_init(¶ms); 724 params.caption = "Hello"; 725 726 rc = ui_window_create(ui, ¶ms, &window); 727 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 728 PCUT_ASSERT_NOT_NULL(window); 729 730 rc = ui_entry_create(window, "ABCD", &entry); 731 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 732 733 PCUT_ASSERT_STR_EQUALS("ABCD", entry->text); 734 entry->pos = 3; 735 entry->sel_start = 3; 736 737 ui_entry_seek_prev_char(entry, true); 738 PCUT_ASSERT_INT_EQUALS(2, entry->pos); 739 PCUT_ASSERT_INT_EQUALS(3, entry->sel_start); 740 741 ui_entry_seek_prev_char(entry, false); 742 PCUT_ASSERT_INT_EQUALS(1, entry->pos); 743 PCUT_ASSERT_INT_EQUALS(1, entry->sel_start); 744 745 ui_entry_destroy(entry); 746 ui_window_destroy(window); 747 ui_destroy(ui); 748 } 749 750 /** ui_entry_seek_prev_char() moves cursor to the next character */ 751 PCUT_TEST(seek_next_char) 752 { 753 errno_t rc; 754 ui_t *ui = NULL; 755 ui_window_t *window = NULL; 756 ui_wnd_params_t params; 757 ui_entry_t *entry; 758 759 rc = ui_create_disp(NULL, &ui); 760 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 761 762 ui_wnd_params_init(¶ms); 763 params.caption = "Hello"; 764 765 rc = ui_window_create(ui, ¶ms, &window); 766 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 767 PCUT_ASSERT_NOT_NULL(window); 768 769 rc = ui_entry_create(window, "ABCD", &entry); 770 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 771 772 PCUT_ASSERT_STR_EQUALS("ABCD", entry->text); 773 entry->pos = 1; 774 entry->sel_start = 1; 775 776 ui_entry_seek_next_char(entry, true); 777 PCUT_ASSERT_INT_EQUALS(2, entry->pos); 778 PCUT_ASSERT_INT_EQUALS(1, entry->sel_start); 779 ui_entry_seek_next_char(entry, false); 780 PCUT_ASSERT_INT_EQUALS(3, entry->pos); 781 PCUT_ASSERT_INT_EQUALS(3, entry->sel_start); 782 783 ui_entry_destroy(entry); 784 ui_window_destroy(window); 785 ui_destroy(ui); 786 } 787 788 /** ui_entry_activate() / ui_entry_deactivate() */ 789 PCUT_TEST(activate_deactivate) 790 { 791 errno_t rc; 792 ui_t *ui = NULL; 793 ui_window_t *window = NULL; 794 ui_wnd_params_t params; 795 ui_entry_t *entry; 796 797 rc = ui_create_disp(NULL, &ui); 798 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 799 800 ui_wnd_params_init(¶ms); 801 params.caption = "Hello"; 802 803 rc = ui_window_create(ui, ¶ms, &window); 804 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 805 PCUT_ASSERT_NOT_NULL(window); 806 807 rc = ui_entry_create(window, "ABC", &entry); 808 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 809 810 PCUT_ASSERT_FALSE(entry->active); 811 812 ui_entry_activate(entry); 813 PCUT_ASSERT_TRUE(entry->active); 814 815 ui_entry_deactivate(entry); 816 PCUT_ASSERT_FALSE(entry->active); 817 818 ui_entry_destroy(entry); 819 ui_window_destroy(window); 820 ui_destroy(ui); 821 } 822 175 823 PCUT_EXPORT(entry);
Note:
See TracChangeset
for help on using the changeset viewer.