Add test/quick.cpp

This commit is contained in:
Peter Dimov
2022-06-02 22:53:12 +03:00
parent 72fe06aa00
commit e2925ba01b
2 changed files with 21 additions and 0 deletions

View File

@ -108,3 +108,5 @@ test-suite unordered-exception
<define>BOOST_UNORDERED_SWAP_METHOD=2 ]
[ run exception/merge_exception_tests.cpp framework ]
;
run quick.cpp ;

19
test/quick.cpp Normal file
View File

@ -0,0 +1,19 @@
// Copyright 2022 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/unordered_map.hpp>
#include <boost/core/lightweight_test.hpp>
#include <string>
int main()
{
boost::unordered_map<std::string, int> map;
map[ "2" ] = 2;
BOOST_TEST_EQ( map[ "1" ], 0 );
BOOST_TEST_EQ( map[ "2" ], 2 );
return boost::report_errors();
}