test_doc  0.1
 全部  文件 函数 变量 宏定义 
test_Parameter.cpp
浏览该文件的文档.
1 /*
2  * test_Parameter.cpp
3  *
4  * Created on: 2013-2-28
5  * Author: fasiondog
6  */
7 
8 
9 #ifdef TEST_ALL_IN_ONE
10  #include <boost/test/unit_test.hpp>
11 #else
12  #define BOOST_TEST_MODULE test_hikyuu_utilities
13  #include <boost/test/unit_test.hpp>
14 #endif
15 
16 #include <hikyuu/Log.h>
17 #include <hikyuu/utilities/Parameter.h>
18 
19 using namespace hku;
20 
28 BOOST_AUTO_TEST_CASE( test_Parameter ) {
29  Parameter param;
30 
31  std::cout << typeid(int).name() << std::endl;
32  std::cout << typeid(unsigned int).name() << std::endl;
33  std::cout << typeid(bool).name() << std::endl;
34  std::cout << typeid(string).name() << std::endl;
35 
36  boost::any a = (size_t)1;
37  std::cout << a.type().name() << std::endl;
38 
39  param.add<int>("n", 1);
40  std::cout << param << std::endl;
41 }
42