Ignore:
Timestamp:
Mar 5, 2014, 7:17:47 PM (11 years ago)
Author:
hock@…
Message:

added 2 simple real test for the SystemQueue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/SystemQueue-tests.cc

    r12747 r12748  
    66
    77
    8 TEST(SystemQueue, Test1)
     8/**
     9 *  Tests if the SystemQueue is initialized empty and not running.
     10 */
     11TEST(SystemQueue, Instantiation)
     12{
     13    SystemQueue& sysq = SystemQueue::instance();
     14   
     15    EXPECT_FALSE( sysq.isRunning() );
     16    EXPECT_TRUE( sysq.isEmpty() );
     17}
     18
     19
     20/**
     21 *  Tests whether calling the SystemQueue::instance() always returns the same object.
     22 *
     23 *  NOTE: This is an easy case, since this is the same compile unit..
     24 *    But can't hurt to test it anyway.
     25 */
     26TEST(SystemQueue, Singleton)
    927{
    1028    SystemQueue& sysq = SystemQueue::instance();
    1129    SystemQueue& sysq2 = SystemQueue::instance();
    12    
    13     ASSERT_FALSE( sysq.isRunning() );
     30
     31//     cout << &sysq << endl;
    1432    ASSERT_TRUE( &sysq == &sysq2 );
    1533}
     34
     35
Note: See TracChangeset for help on using the changeset viewer.