| 72 | } |
| 73 | |
| 74 | void ExpectSubstrOrder(const string& s, const string& before, |
| 75 | const string& after) { |
| 76 | int before_pos = s.find(before); |
| 77 | int after_pos = s.find(after); |
| 78 | ASSERT_NE(std::string::npos, before_pos); |
| 79 | ASSERT_NE(std::string::npos, after_pos); |
| 80 | EXPECT_LT(before_pos, after_pos) |
| 81 | << before << " is not before " << after << " in " << s; |
| 82 | } |
| 83 | |
| 84 | // Runs WriteCCOps and stores output in (internal_)cc_file_path and |
| 85 | // (internal_)h_file_path. |