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 128 of file RingBufferTests.cpp.

Constructor & Destructor Documentation

◆ RingBufferTests()

RingBuffer::RingBufferTests::RingBufferTests ( )
inline

Constructor.

Definition at line 203 of file RingBufferTests.cpp.

◆ ~RingBufferTests()

RingBuffer::RingBufferTests::~RingBufferTests ( )
inline

Destructor.

Definition at line 210 of file RingBufferTests.cpp.

Member Function Documentation

◆ CPPUNIT_TEST() [1/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_length  )
private

◆ CPPUNIT_TEST() [2/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_isFull  )
private

◆ CPPUNIT_TEST() [3/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_isEmpty  )
private

◆ CPPUNIT_TEST() [4/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_init  )
private

◆ CPPUNIT_TEST() [5/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_write_read  )
private

◆ CPPUNIT_TEST() [6/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_write_read_with_small_length  )
private

◆ CPPUNIT_TEST() [7/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_isNew  )
private

◆ CPPUNIT_TEST() [8/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_reset  )
private

◆ CPPUNIT_TEST() [9/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_wptr_put  )
private

◆ CPPUNIT_TEST() [10/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_advanceWptr  )
private

◆ CPPUNIT_TEST() [11/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_rptr_get  )
private

◆ CPPUNIT_TEST() [12/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_advanceRptr  )
private

◆ CPPUNIT_TEST() [13/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_owrite_rback  )
private

◆ CPPUNIT_TEST() [14/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_owrite_dnothing  )
private

◆ CPPUNIT_TEST() [15/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_owrite_block  )
private

◆ CPPUNIT_TEST() [16/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_dnothing_rback  )
private

◆ CPPUNIT_TEST() [17/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_dnothing_dnothing  )
private

◆ CPPUNIT_TEST() [18/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_dnothing_block  )
private

◆ CPPUNIT_TEST() [19/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_block_rback  )
private

◆ CPPUNIT_TEST() [20/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_block_dnothing  )
private

◆ CPPUNIT_TEST() [21/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_block_block_wr  )
private

◆ CPPUNIT_TEST() [22/22]

RingBuffer::RingBufferTests::CPPUNIT_TEST ( test_block_block_rw  )
private

◆ CPPUNIT_TEST_SUITE()

RingBuffer::RingBufferTests::CPPUNIT_TEST_SUITE ( RingBufferTests  )
private

◆ CPPUNIT_TEST_SUITE_END()

RingBuffer::RingBufferTests::CPPUNIT_TEST_SUITE_END ( )
private

◆ do_test()

void RingBuffer::RingBufferTests::do_test ( RTC::RingBuffer< int > &  buff,
int  loop = NLOOP,
bool  read_first = false 
)
inlineprivate

Definition at line 162 of file RingBufferTests.cpp.

◆ setUp()

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

Test initialization.

Definition at line 217 of file RingBufferTests.cpp.

◆ tearDown()

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

Test finalization.

Definition at line 224 of file RingBufferTests.cpp.

◆ test_advanceRptr()

void RingBuffer::RingBufferTests::test_advanceRptr ( )
inline

advanceRptr()メソッドのテスト

Definition at line 761 of file RingBufferTests.cpp.

◆ test_advanceWptr()

void RingBuffer::RingBufferTests::test_advanceWptr ( )
inline

advanceWptr()メソッドのテスト

Definition at line 689 of file RingBufferTests.cpp.

◆ test_block_block_rw()

void RingBuffer::RingBufferTests::test_block_block_rw ( )
inline

Definition at line 1135 of file RingBufferTests.cpp.

◆ test_block_block_wr()

void RingBuffer::RingBufferTests::test_block_block_wr ( )
inline

Definition at line 1093 of file RingBufferTests.cpp.

◆ test_block_dnothing()

void RingBuffer::RingBufferTests::test_block_dnothing ( )
inline

Definition at line 1054 of file RingBufferTests.cpp.

◆ test_block_rback()

void RingBuffer::RingBufferTests::test_block_rback ( )
inline

Definition at line 1016 of file RingBufferTests.cpp.

◆ test_dnothing_block()

void RingBuffer::RingBufferTests::test_dnothing_block ( )
inline

Definition at line 978 of file RingBufferTests.cpp.

◆ test_dnothing_dnothing()

void RingBuffer::RingBufferTests::test_dnothing_dnothing ( )
inline

Definition at line 941 of file RingBufferTests.cpp.

◆ test_dnothing_rback()

void RingBuffer::RingBufferTests::test_dnothing_rback ( )
inline

Definition at line 905 of file RingBufferTests.cpp.

◆ test_init()

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

init()メソッドのテスト

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

Definition at line 317 of file RingBufferTests.cpp.

◆ test_isEmpty()

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

isEmpty()メソッドのテスト

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

Definition at line 252 of file RingBufferTests.cpp.

◆ test_isFull()

void RingBuffer::RingBufferTests::test_isFull ( )
inline

isFull()メソッドのテスト

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

Definition at line 286 of file RingBufferTests.cpp.

◆ test_isNew()

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

isNew()メソッドのテスト

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

Definition at line 582 of file RingBufferTests.cpp.

◆ test_length()

void RingBuffer::RingBufferTests::test_length ( )
inline

length()メソッドのテスト

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

Definition at line 233 of file RingBufferTests.cpp.

◆ test_owrite_block()

void RingBuffer::RingBufferTests::test_owrite_block ( )
inline

Definition at line 868 of file RingBufferTests.cpp.

◆ test_owrite_dnothing()

void RingBuffer::RingBufferTests::test_owrite_dnothing ( )
inline

Definition at line 831 of file RingBufferTests.cpp.

◆ test_owrite_rback()

void RingBuffer::RingBufferTests::test_owrite_rback ( )
inline

Definition at line 795 of file RingBufferTests.cpp.

◆ test_reset()

void RingBuffer::RingBufferTests::test_reset ( )
inline

reset()メソッドのテスト

Definition at line 630 of file RingBufferTests.cpp.

◆ test_rptr_get()

void RingBuffer::RingBufferTests::test_rptr_get ( )
inline

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

Definition at line 718 of file RingBufferTests.cpp.

◆ test_wptr_put()

void RingBuffer::RingBufferTests::test_wptr_put ( )
inline

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

Definition at line 656 of file RingBufferTests.cpp.

◆ test_write_read()

void RingBuffer::RingBufferTests::test_write_read ( )
inline

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

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

Definition at line 348 of file RingBufferTests.cpp.

◆ test_write_read_with_small_length()

void RingBuffer::RingBufferTests::test_write_read_with_small_length ( )
inline

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

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

Definition at line 474 of file RingBufferTests.cpp.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:47