| 1 |
/* Common utility code shared between test cases. */ |
| 2 |
|
| 3 |
#ifndef TEST_HELPERSPP_H |
| 4 |
#define TEST_HELPERSPP_H |
| 5 |
|
| 6 |
namespace libgdiagnostics { |
| 7 |
|
| 8 |
inline physical_location |
| 9 |
make_range (manager &mgr, |
| 10 |
file f, |
| 11 |
line_num_t line_num, |
| 12 |
column_num_t start_column, |
| 13 |
column_num_t end_column) |
| 14 |
{ |
| 15 |
auto loc_start = mgr.new_location_from_file_line_column (f, |
| 16 |
line_num, |
| 17 |
start_column); |
| 18 |
auto loc_end = mgr.new_location_from_file_line_column (f, |
| 19 |
line_num, |
| 20 |
end_column); |
| 21 |
return mgr.new_location_from_range (loc_start, |
| 22 |
loc_start, |
| 23 |
loc_end); |
| 24 |
} |
| 25 |
|
| 26 |
} // namespace libgdiagnostics |
| 27 |
|
| 28 |
#endif /* #ifndef TEST_HELPERSPP_H */ |