Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/check_jabber_util.c

    r842cd8d r98de2cc  
    1414       
    1515        budw1 = jabber_buddy_add( ic, "wilmer@gaast.net/BitlBee" );
    16         budw1->last_msg = time( NULL ) - 100;
     16        budw1->last_act = time( NULL ) - 100;
    1717        budw2 = jabber_buddy_add( ic, "WILMER@gaast.net/Telepathy" );
    1818        budw2->priority = 2;
    19         budw2->last_msg = time( NULL );
     19        budw2->last_act = time( NULL );
    2020        budw3 = jabber_buddy_add( ic, "wilmer@GAAST.NET/bitlbee" );
    21         budw3->last_msg = time( NULL ) - 200;
     21        budw3->last_act = time( NULL ) - 200;
    2222        budw3->priority = 4;
    2323        /* TODO(wilmer): Shouldn't this just return budw3? */
     
    6060        fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/Telepathy" ) );
    6161        fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/telepathy" ) );
    62        
    63         /* Test activity_timeout and GET_BUDDY_BARE_OK. */
    64         fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) == budw1 );
    65         budw1->last_msg -= 50;
    66         fail_unless( ( bud = jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) ) != NULL );
    67         fail_unless( strcmp( bud->full_jid, "wilmer@gaast.net" ) == 0 );
     62        fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) == budw1 );
    6863       
    6964        fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net" ) );
    7065        fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) == budw1 );
    7166       
    72         fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net" ) );
    73         fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/bitlbee" ) );
    74         fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/BitlBee" ) );
    75         fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) );
    76        
    7767        /* Check if remove_bare() indeed gets rid of all. */
    78         /* disable this one for now.
    7968        fail_unless( jabber_buddy_remove_bare( ic, "wilmer@gaast.net" ) );
    8069        fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) );
    81         */
    8270
    8371        fail_if( jabber_buddy_remove( ic, "nekkid@lamejab.net/Illegal" ) );
    8472        fail_unless( jabber_buddy_remove( ic, "nekkid@lamejab.net" ) );
    8573        fail_if( jabber_buddy_by_jid( ic, "nekkid@lamejab.net", 0 ) );
    86        
    87         /* Fixing a bug in this branch that caused information to get lost when
    88            removing the first full JID from a list. */
    89         jabber_buddy_add( ic, "bugtest@google.com/A" );
    90         jabber_buddy_add( ic, "bugtest@google.com/B" );
    91         jabber_buddy_add( ic, "bugtest@google.com/C" );
    92         fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/A" ) );
    93         fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/B" ) );
    94         fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/C" ) );
    9574}
    9675
     
    10685        jd->buddies = g_hash_table_new( g_str_hash, g_str_equal );
    10786        set_add( &ic->acc->set, "resource_select", "priority", NULL, ic->acc );
    108         set_add( &ic->acc->set, "activity_timeout", "120", NULL, ic->acc );
    10987       
    11088        suite_add_tcase (s, tc_core);
Note: See TracChangeset for help on using the changeset viewer.