summaryrefslogtreecommitdiff
path: root/tests/availability-cmp.c
blob: 7b17b3747c0ab3dcd7218b4ab60a512537379edd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "config.h"

#include <glib.h>
#include <telepathy-glib/connection.h>

int main (int argc, char **argv)
{
  g_assert (tp_connection_presence_type_cmp_availability (
    TP_CONNECTION_PRESENCE_TYPE_AWAY, TP_CONNECTION_PRESENCE_TYPE_UNSET) == 1);

  g_assert (tp_connection_presence_type_cmp_availability (
    TP_CONNECTION_PRESENCE_TYPE_BUSY, TP_CONNECTION_PRESENCE_TYPE_AVAILABLE) == -1);

  g_assert (tp_connection_presence_type_cmp_availability (
    TP_CONNECTION_PRESENCE_TYPE_UNKNOWN, 100) == 0);

  return 0;
}