Esempio n. 1
0
  void testBasic( void )
  {
    TEST_HEADER;
    Semaphore s;
    TS_ASSERT_EQUALS( s.getCount(), 1 );

    TS_ASSERT_EQUALS( s.lock(), true );
    TS_ASSERT_EQUALS( s.getCount(), 0 );

    TS_ASSERT_EQUALS( s.unLock(), true );
    TS_ASSERT_EQUALS( s.getCount(), 1 );

  }