File: testdbussocket.c

package info (click to toggle)
fcitx 1%3A4.2.9.9-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 19,800 kB
  • sloc: ansic: 134,151; cpp: 7,280; sh: 2,778; python: 800; xml: 345; makefile: 42
file content (22 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <assert.h>
#include <stdlib.h>

#define _FCITX_TEST

#include "dbussocket.h"

int main()
{
    FcitxDBusWatchList watches;
    watches.head = NULL;
    watches.listModified = 0;
    DBusAddWatch((void *)0x1, &watches);
    assert(watches.head != NULL);
    DBusRemoveWatch((void *)0x1, &watches);
    assert(watches.head == NULL);

    DBusRemoveWatch((void *)0x1, &watches);

    assert(watches.head == NULL);
    return 0;
}