1 #include "gnumeric_helper.hpp" 2 #include "gnumeric_helper.cpp" 3 4 #include <iostream> 5 6 namespace { 7 8 /* 9 void test_split_string() 10 { 11 orcus::pstring str("str1:str2:str3"); 12 std::vector<orcus::pstring> res = string_helper::split_string(str, ':'); 13 assert(res.size() == 3); 14 assert(res[0] == "str1"); 15 assert(res[1] == "str2"); 16 assert(res[2] == "str3"); 17 } 18 */ 19 test_parse_color_string()20void test_parse_color_string() 21 { 22 orcus::pstring str("8080"); 23 size_t res = orcus::parse_color_string(str); 24 std::cout << res << std::endl; 25 assert(res == 128); 26 27 res = orcus::parse_color_string(orcus::pstring("FFFF")); 28 assert(res == 255); 29 30 res = orcus::parse_color_string(orcus::pstring("0")); 31 assert(res == 0); 32 } 33 34 } 35 main()36int main() 37 { 38 test_parse_color_string(); 39 } 40