メインページ | ネームスペース一覧 | クラス階層 | 構成 | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ | 関連ページ

hash_test.cpp

説明を見る。
00001 #include "static_container/test/assert_new.h"
00002 #include <boost/test/minimal.hpp>
00003 #include "static_container/list_hash.h"
00004 #include <string.h>
00005 
00006 using namespace static_container;
00007 
00009 void test_int_hash() {
00010     typedef list_hash<
00011         int,
00012         int,
00013         10 >    int_hash;
00014     
00015     int_hash ihash;
00016     ihash[ 0 ] = 100;
00017     ihash[ 5 ] = 20;
00018     
00019     BOOST_REQUIRE( 2 == ihash.size() );
00020     BOOST_REQUIRE( 100 == ihash[ 0 ] );
00021     BOOST_REQUIRE( 20 == ihash[ 5 ] );
00022     ihash[ 5 ] = 30;
00023     BOOST_REQUIRE( 30 == ihash[ 5 ] );
00024     BOOST_REQUIRE( 2 == ihash.size() ); 
00025 }
00026 
00027 
00028 int test_main( int argc, char* argv[] ) {
00029     test::begin(); // new 呼び出しに怒り狂う!
00030     test_int_hash();
00031     return 0;
00032 }

static_containerに対してSat Jun 19 11:30:58 2004に生成されました。 doxygen 1.3.6