Changeset b279899 in mainline for uspace/lib/tbarcfg/test


Ignore:
Timestamp:
2023-10-17T12:18:10Z (21 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d4643db
Parents:
4030072
git-author:
Jiri Svoboda <jiri@…> (2023-10-16 18:17:59)
git-committer:
Jiri Svoboda <jiri@…> (2023-10-17 12:18:10)
Message:

Rename startmenu library to tbarcfg

There may be other aspects of task bar that will need configuring
so let's widen the scope of the library a bit.

Location:
uspace/lib/tbarcfg/test
Files:
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/tbarcfg/test/main.c

    r4030072 rb279899  
    3131PCUT_INIT;
    3232
    33 PCUT_IMPORT(startmenu);
     33PCUT_IMPORT(tbarcfg);
    3434
    3535PCUT_MAIN();
  • uspace/lib/tbarcfg/test/tbarcfg.c

    r4030072 rb279899  
    2929#include <errno.h>
    3030#include <pcut/pcut.h>
    31 #include <startmenu/startmenu.h>
     31#include <tbarcfg/tbarcfg.h>
    3232#include <stdio.h>
    3333
    3434PCUT_INIT;
    3535
    36 PCUT_TEST_SUITE(startmenu);
     36PCUT_TEST_SUITE(tbarcfg);
    3737
    38 /** Opening and closing start menu */
     38/** Opening and closing task bar configuration */
    3939PCUT_TEST(open_close)
    4040{
    4141        errno_t rc;
    42         startmenu_t *smenu;
     42        tbarcfg_t *tbcfg;
    4343        FILE *f;
    4444        int rv;
     
    5353        PCUT_ASSERT_INT_EQUALS(0, rv);
    5454
    55         rc = startmenu_open("/tmp/test", &smenu);
     55        rc = tbarcfg_open("/tmp/test", &tbcfg);
    5656        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    5757
    58         startmenu_close(smenu);
     58        tbarcfg_close(tbcfg);
    5959}
    6060
     
    6363{
    6464        errno_t rc;
    65         startmenu_t *smenu;
    66         startmenu_entry_t *e;
     65        tbarcfg_t *tbcfg;
     66        smenu_entry_t *e;
    6767        FILE *f;
    6868        int rv;
     
    8080        PCUT_ASSERT_INT_EQUALS(0, rv);
    8181
    82         rc = startmenu_open("/tmp/test", &smenu);
     82        rc = tbarcfg_open("/tmp/test", &tbcfg);
    8383        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    8484
    85         e = startmenu_first(smenu);
     85        e = tbarcfg_smenu_first(tbcfg);
    8686        PCUT_ASSERT_NOT_NULL(e);
    87         e = startmenu_next(e);
     87        e = tbarcfg_smenu_next(e);
    8888        PCUT_ASSERT_NOT_NULL(e);
    89         e = startmenu_next(e);
     89        e = tbarcfg_smenu_next(e);
    9090        PCUT_ASSERT_NULL(e);
    9191
    92         startmenu_close(smenu);
     92        tbarcfg_close(tbcfg);
    9393}
    9494
     
    9797{
    9898        errno_t rc;
    99         startmenu_t *smenu;
    100         startmenu_entry_t *e;
     99        tbarcfg_t *tbcfg;
     100        smenu_entry_t *e;
    101101        const char *caption;
    102102        const char *cmd;
     
    115115        PCUT_ASSERT_INT_EQUALS(0, rv);
    116116
    117         rc = startmenu_open("/tmp/test", &smenu);
     117        rc = tbarcfg_open("/tmp/test", &tbcfg);
    118118        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    119119
    120         e = startmenu_first(smenu);
     120        e = tbarcfg_smenu_first(tbcfg);
    121121        PCUT_ASSERT_NOT_NULL(e);
    122122
    123         caption = startmenu_entry_get_caption(e);
     123        caption = smenu_entry_get_caption(e);
    124124        PCUT_ASSERT_STR_EQUALS("A", caption);
    125         cmd = startmenu_entry_get_cmd(e);
     125        cmd = smenu_entry_get_cmd(e);
    126126        PCUT_ASSERT_STR_EQUALS("a", cmd);
    127127
    128         startmenu_close(smenu);
     128        tbarcfg_close(tbcfg);
    129129}
    130130
    131 PCUT_EXPORT(startmenu);
     131PCUT_EXPORT(tbarcfg);
Note: See TracChangeset for help on using the changeset viewer.