summaryrefslogtreecommitdiff
path: root/tests/availability-cmp.c
blob: 56ce828511580cb9f500e3d90a71a500464b7d92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#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;
}