'Test StringLines index_to_line_start_index and index_to_line_end_index.'

@data({'string': 'test', 'index': 0, 'line_start_index': 0, 'line_end_index': 4}, {'string': 'test', 'index': 2, 'line_start_index': 0, 'line_end_index': 4}, {'string': 'test', 'index': 3, 'line_start_index': 0, 'line_end_index': 4}, {'string': '\ntest', 'index': 0, 'line_start_index': 0, 'line_end_index': 1}, {'string': '\ntest', 'index': 2, 'line_start_index': 1, 'line_end_index': 5}, {'string': '\ntest\n', 'index': 0, 'line_start_index': 0, 'line_end_index': 1}, {'string': '\ntest\n', 'index': 2, 'line_start_index': 1, 'line_end_index': 6}, {'string': '\ntest\n', 'index': 6, 'line_start_index': 6, 'line_end_index': 6})
def test_string_lines_start_end_index(self, data):

    lines = StringLines(data['string'])
    self.assertEqual(lines.index_to_line_start_index(data['index']), data['line_start_index'])
    self.assertEqual(lines.index_to_line_end_index(data['index']), data['line_end_index'])
