#include <gslib/test/assert_new.h>
#include <boost/test/auto_unit_test.hpp>
#include <gslib/static_container/list_hash.h>
#include <string.h>
Include dependency graph for hash_test.cpp:
Go to the source code of this file.
Namespaces | |
namespace | static_container |
Defines | |
#define | BOOST_AUTO_TEST_MAIN |
Functions | |
BOOST_AUTO_UNIT_TEST (test_int_hash) |
|
Definition at line 2 of file hash_test.cpp. |
|
Definition at line 11 of file hash_test.cpp.
00011 { 00012 test::assert_new::begin(); // new 呼び出しに怒り狂う! 00013 typedef list_hash< 00014 int, 00015 int, 00016 10 > int_hash; 00017 00018 int_hash ihash; 00019 ihash[ 0 ] = 100; 00020 ihash[ 5 ] = 20; 00021 00022 BOOST_REQUIRE( 2 == ihash.size() ); 00023 BOOST_REQUIRE( 100 == ihash[ 0 ] ); 00024 BOOST_REQUIRE( 20 == ihash[ 5 ] ); 00025 ihash[ 5 ] = 30; 00026 BOOST_REQUIRE( 30 == ihash[ 5 ] ); 00027 BOOST_REQUIRE( 2 == ihash.size() ); 00028 test::assert_new::end(); 00029 } |