diff options
author | Neil <nyamatongwe@gmail.com> | 2023-10-26 14:48:39 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2023-10-26 14:48:39 +1100 |
commit | d6d33d9460fb5fba165cbbd743b501324baa7516 (patch) | |
tree | e5ac09d5a24c3d91819899ee4d9b589ecd04a92c /test | |
parent | 624100e7bccb2f8cc740bf9306f6eb2768fdb51d (diff) | |
download | scintilla-mirror-d6d33d9460fb5fba165cbbd743b501324baa7516.tar.gz |
Add LineStartPosition to replace common idiom LineStart(LineFromPosition(x)) as
this shortens code. LineStartPosition is also noexcept which allows callers to
be noexcept.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/testDocument.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/unit/testDocument.cxx b/test/unit/testDocument.cxx index 570e54c4c..863bf1959 100644 --- a/test/unit/testDocument.cxx +++ b/test/unit/testDocument.cxx @@ -155,6 +155,7 @@ TEST_CASE("Document") { REQUIRE(1 == doc.document.LinesTotal()); REQUIRE(0 == doc.document.LineStart(0)); REQUIRE(0 == doc.document.LineFromPosition(0)); + REQUIRE(0 == doc.document.LineStartPosition(0)); REQUIRE(sLength == doc.document.LineStart(1)); REQUIRE(0 == doc.document.LineFromPosition(static_cast<int>(sLength))); REQUIRE(doc.document.CanUndo()); |