| 1054 | } |
| 1055 | |
| 1056 | void audit(t_program* new_program, |
| 1057 | t_program* old_program, |
| 1058 | string new_thrift_include_path, |
| 1059 | string old_thrift_include_path) { |
| 1060 | vector<string> temp_incl_searchpath = g_incl_searchpath; |
| 1061 | if (!old_thrift_include_path.empty()) { |
| 1062 | g_incl_searchpath.push_back(old_thrift_include_path); |
| 1063 | } |
| 1064 | |
| 1065 | std::set<std::string> old_includes; |
| 1066 | parse(old_program, nullptr, old_includes); |
| 1067 | |
| 1068 | g_incl_searchpath = temp_incl_searchpath; |
| 1069 | if (!new_thrift_include_path.empty()) { |
| 1070 | g_incl_searchpath.push_back(new_thrift_include_path); |
| 1071 | } |
| 1072 | |
| 1073 | std::set<std::string> new_includes; |
| 1074 | parse(new_program, nullptr, new_includes); |
| 1075 | |
| 1076 | compare_namespace(new_program, old_program); |
| 1077 | compare_services(new_program->get_services(), old_program->get_services()); |
| 1078 | compare_enums(new_program->get_enums(), old_program->get_enums()); |
| 1079 | compare_structs(new_program->get_structs(), old_program->get_structs()); |
| 1080 | compare_structs(new_program->get_xceptions(), old_program->get_xceptions()); |
| 1081 | compare_consts(new_program->get_consts(), old_program->get_consts()); |
| 1082 | } |
| 1083 | |
| 1084 | /** |
| 1085 | * Parse it up.. then spit it back out, in pretty much every language. Alright |
no test coverage detected