(t *testing.T)
| 1177 | } |
| 1178 | |
| 1179 | func TestDocument_LineCount(t *testing.T) { |
| 1180 | d := &Document{ |
| 1181 | Text: "line 1\nline 2\nline 3\nline 4\n", |
| 1182 | cursorPosition: len("line 1\n" + "lin"), |
| 1183 | } |
| 1184 | ac := d.LineCount() |
| 1185 | ex := 5 |
| 1186 | if ac != ex { |
| 1187 | t.Errorf("Should be %#v, got %#v", ex, ac) |
| 1188 | } |
| 1189 | } |
| 1190 | |
| 1191 | func TestDocument_TranslateIndexToPosition(t *testing.T) { |
| 1192 | d := &Document{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…