| 71 | } |
| 72 | |
| 73 | static void test_parse(const char* filepath) |
| 74 | { |
| 75 | acl::string buf; |
| 76 | if (acl::ifstream::load(filepath, &buf) == false) |
| 77 | { |
| 78 | printf("load %s error %s\r\n", filepath, acl::last_serror()); |
| 79 | return; |
| 80 | } |
| 81 | |
| 82 | acl::xml1 xml; |
| 83 | xml.update(buf); |
| 84 | //printf("------------- buf data print ----------------------\r\n"); |
| 85 | //printf("[%s]\r\n", buf.c_str()); |
| 86 | //printf("------------- xml data print-----------------------\r\n"); |
| 87 | //printf("[%s]\r\n", xml.to_string()); |
| 88 | printf("------------- xml node walk -----------------------\r\n"); |
| 89 | xml_node_walk(xml.get_root(), 0); |
| 90 | |
| 91 | printf("------------- build xml ---------------------------\r\n"); |
| 92 | printf("%s\r\n", xml.to_string()); |
| 93 | printf("------------- build xml end -----------------------\r\n"); |
| 94 | } |
| 95 | |
| 96 | static void test_parse_mmap(const char* filepath) |
| 97 | { |
no test coverage detected
searching dependent graphs…