Public Member Functions | Private Member Functions | List of all members
RingBuffer::RingBufferTests Class Reference

RingBuffer test. More...

Inheritance diagram for RingBuffer::RingBufferTests:
Inheritance graph
[legend]

Public Member Functions

 RingBufferTests ()
 Constructor. More...
 
virtual void setUp ()
 Test initialization. More...
 
virtual void tearDown ()
 Test finalization. More...
 
void test_advanceRptr ()
 advanceRptr()メソッドのテスト More...
 
void test_advanceWptr ()
 advanceWptr()メソッドのテスト More...
 
void test_block_block_rw ()
 
void test_block_block_wr ()
 
void test_block_dnothing ()
 
void test_block_rback ()
 
void test_dnothing_block ()
 
void test_dnothing_dnothing ()
 
void test_dnothing_rback ()
 
void test_init ()
 init()メソッドのテスト More...
 
void test_isEmpty ()
 isEmpty()メソッドのテスト More...
 
void test_isFull ()
 isFull()メソッドのテスト More...
 
void test_isNew ()
 isNew()メソッドのテスト More...
 
void test_length ()
 length()メソッドのテスト More...
 
void test_owrite_block ()
 
void test_owrite_dnothing ()
 
void test_owrite_rback ()
 
void test_reset ()
 reset()メソッドのテスト More...
 
void test_rptr_get ()
 rptr(),get()メソッドのテスト More...
 
void test_wptr_put ()
 wptr(),put()メソッドのテスト More...
 
void test_write_read ()
 write()メソッドおよびread()メソッドのテスト More...
 
void test_write_read_with_small_length ()
 write()メソッドおよびread()メソッドのテスト(バッファ長2の場合) More...
 
 ~RingBufferTests ()
 Destructor. More...
 

Private Member Functions

 CPPUNIT_TEST (test_length)
 
 CPPUNIT_TEST (test_isFull)
 
 CPPUNIT_TEST (test_isEmpty)
 
 CPPUNIT_TEST (test_init)
 
 CPPUNIT_TEST (test_write_read)
 
 CPPUNIT_TEST (test_write_read_with_small_length)
 
 CPPUNIT_TEST (test_isNew)
 
 CPPUNIT_TEST (test_reset)
 
 CPPUNIT_TEST (test_wptr_put)
 
 CPPUNIT_TEST (test_advanceWptr)
 
 CPPUNIT_TEST (test_rptr_get)
 
 CPPUNIT_TEST (test_advanceRptr)
 
 CPPUNIT_TEST (test_owrite_rback)
 
 CPPUNIT_TEST (test_owrite_dnothing)
 
 CPPUNIT_TEST (test_owrite_block)
 
 CPPUNIT_TEST (test_dnothing_rback)
 
 CPPUNIT_TEST (test_dnothing_dnothing)
 
 CPPUNIT_TEST (test_dnothing_block)
 
 CPPUNIT_TEST (test_block_rback)
 
 CPPUNIT_TEST (test_block_dnothing)
 
 CPPUNIT_TEST (test_block_block_wr)
 
 CPPUNIT_TEST (test_block_block_rw)
 
 CPPUNIT_TEST_SUITE (RingBufferTests)
 
 CPPUNIT_TEST_SUITE_END ()
 
void do_test (RTC::RingBuffer< int > &buff, int loop=NLOOP, bool read_first=false)
 

Detailed Description

RingBuffer test.

Definition at line 122 of file RingBufferTests.cpp.

Constructor & Destructor Documentation

RingBuffer::RingBufferTests::RingBufferTests ( )
inline

Constructor.

Definition at line 197 of file RingBufferTests.cpp.

RingBuffer::RingBufferTests::~RingBufferTests ( )
inline

Destructor.

Definition at line 204 of file RingBufferTests.cpp.

Member Function Documentation

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_length  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_isFull  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_isEmpty  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_init  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_write_read  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_write_read_with_small_length  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_isNew  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_reset  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_wptr_put  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_advanceWptr  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_rptr_get  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_advanceRptr  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_owrite_rback  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_owrite_dnothing  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_owrite_block  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_dnothing_rback  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_dnothing_dnothing  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_dnothing_block  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_block_rback  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_block_dnothing  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_block_block_wr  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_block_block_rw  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST_SUITE ( RingBufferTests  )
private
RingBuffer::RingBufferTests::CPPUNIT_TEST_SUITE_END ( )
private
void RingBuffer::RingBufferTests::do_test ( RTC::RingBuffer< int > &  buff,
int  loop = NLOOP,
bool  read_first = false 
)
inlineprivate

Definition at line 156 of file RingBufferTests.cpp.

virtual void RingBuffer::RingBufferTests::setUp ( )
inlinevirtual

Test initialization.

Definition at line 211 of file RingBufferTests.cpp.

virtual void RingBuffer::RingBufferTests::tearDown ( )
inlinevirtual

Test finalization.

Definition at line 218 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_advanceRptr ( )
inline

advanceRptr()メソッドのテスト

Definition at line 755 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_advanceWptr ( )
inline

advanceWptr()メソッドのテスト

Definition at line 683 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_block_block_rw ( )
inline

Definition at line 1129 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_block_block_wr ( )
inline

Definition at line 1087 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_block_dnothing ( )
inline

Definition at line 1048 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_block_rback ( )
inline

Definition at line 1010 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_dnothing_block ( )
inline

Definition at line 972 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_dnothing_dnothing ( )
inline

Definition at line 935 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_dnothing_rback ( )
inline

Definition at line 899 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_init ( void  )
inline

init()メソッドのテスト

  • あらかじめデータで初期化した後、設定したデータを正しく読み出せるか?

Definition at line 311 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_isEmpty ( void  )
inline

isEmpty()メソッドのテスト

  • バッファ初期化直後、空ではないと判定されるか?
  • 最後にデータが読み取られた後、新しいデータが書き込みされていない場合、 空と判定されるか?
  • 最後にデータが読み取られた後、新しいデータが書き込みされた場合、 空ではないと判定されるか?

Definition at line 246 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_isFull ( )
inline

isFull()メソッドのテスト

  • バッファが空の場合、フル判定は偽となるか?
  • 全バッファにデータが書き込まれている状態で、フル判定は真となるか?
  • バッファに幾分データが書き込まれている状態で、フル判定は偽となるか?

Definition at line 280 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_isNew ( void  )
inline

isNew()メソッドのテスト

  • バッファが空の状態で、isNew判定が偽になるか?
  • 全バッファにデータが書き込まれている状態で、 データ書込後のisNew判定が真になるか?
  • 全バッファにデータが書き込まれている状態で、データ書込し、 そのデータ読出を行った後のisNew判定が偽になるか?
  • バッファに幾分データが書き込まれている状態で、データ書込後のisNew 判定が真になるか?
  • バッファに幾分データが書き込まれている状態で、データ書込し、 そのデータ読出を行った後のisNew判定が偽になるか?

Definition at line 576 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_length ( )
inline

length()メソッドのテスト

  • コンストラクタで指定されたバッファ長が正しく取得できるか?

Definition at line 227 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_owrite_block ( )
inline

Definition at line 862 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_owrite_dnothing ( )
inline

Definition at line 825 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_owrite_rback ( )
inline

Definition at line 789 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_reset ( )
inline

reset()メソッドのテスト

Definition at line 624 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_rptr_get ( )
inline

rptr(),get()メソッドのテスト

Definition at line 712 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_wptr_put ( )
inline

wptr(),put()メソッドのテスト

Definition at line 650 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_write_read ( )
inline

write()メソッドおよびread()メソッドのテスト

  • バッファ空状態で1データ書込・読出を行い、書き込んだデータを正しく 読み出せるか?
  • 全バッファにデータが書き込まれている状態で1データ書込・読出を行い、 書き込んだデータを正しく読み出せるか?
  • 全バッファに幾分データが書き込まれている状態で1データ書込・読出を 行い、書き込んだデータを正しく読み出せるか?

Definition at line 342 of file RingBufferTests.cpp.

void RingBuffer::RingBufferTests::test_write_read_with_small_length ( )
inline

write()メソッドおよびread()メソッドのテスト(バッファ長2の場合)

  • バッファ空状態で1データ書込・読出を行い、書き込んだデータを正しく 読み出せるか?
  • 全バッファにデータが書き込まれている状態で1データ書込・読出を行い、 書き込んだデータを正しく読み出せるか?
  • バッファに幾分データが書き込まれている状態で1データ書込・読出を行い、 書き込んだデータを正しく読み出せるか?

Definition at line 468 of file RingBufferTests.cpp.


The documentation for this class was generated from the following file:


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:26:03