Searched refs:ccnv (Results 1 – 2 of 2) sorted by relevance
/third_party/boost/libs/convert/test/ |
D | stream_converter.cpp | 57 boost::cnv::cstream ccnv; in test_numbase() local 59 BOOST_TEST(convert<int>( "11", ccnv(std::hex)).value_or(0) == 17); // 11(16) = 17(10) in test_numbase() 60 BOOST_TEST(convert<int>( "11", ccnv(std::oct)).value_or(0) == 9); // 11(8) = 9(10) in test_numbase() 61 BOOST_TEST(convert<int>( "11", ccnv(std::dec)).value_or(0) == 11); in test_numbase() 63 BOOST_TEST(convert<string>( 18, ccnv(std::hex)).value_or("bad") == "12"); // 18(10) = 12(16) in test_numbase() 64 BOOST_TEST(convert<string>( 10, ccnv(std::oct)).value_or("bad") == "12"); // 10(10) = 12(8) in test_numbase() 65 BOOST_TEST(convert<string>( 12, ccnv(std::dec)).value_or("bad") == "12"); in test_numbase() 66 …BOOST_TEST(convert<string>(255, ccnv(arg::base = boost::cnv::base::oct)).value_or("bad") == "377"); in test_numbase() 67 …BOOST_TEST(convert<string>(255, ccnv(arg::base = boost::cnv::base::hex)).value_or("bad") == "ff"); in test_numbase() 68 …BOOST_TEST(convert<string>(255, ccnv(arg::base = boost::cnv::base::dec)).value_or("bad") == "255"); in test_numbase() [all …]
|
/third_party/boost/libs/convert/example/ |
D | stream.cpp | 45 boost::cnv::cstream ccnv; in example2() local 48 int v01 = convert<int>(" FF", ccnv(std::hex)(std::skipws)).value_or(0); in example2() 50 int v03 = convert<int>(" FF", ccnv(std::dec)(std::skipws)).value_or(-5); in example2() 59 ccnv(std::showbase)(std::uppercase)(std::hex); in example2() 61 BOOST_TEST(convert<string>(255, ccnv, "bad") == "0XFF"); in example2() 62 BOOST_TEST(convert<string>( 15, ccnv, "bad") == "0XF"); in example2() 65 ccnv(arg::base = cnv::base::dec) in example2() 70 ccnv(std::dec)(std::uppercase)(std::scientific); in example2()
|