aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/unit/testCellBuffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/testCellBuffer.cxx')
-rw-r--r--test/unit/testCellBuffer.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/unit/testCellBuffer.cxx b/test/unit/testCellBuffer.cxx
index 86ab3a59c..7a13e88b8 100644
--- a/test/unit/testCellBuffer.cxx
+++ b/test/unit/testCellBuffer.cxx
@@ -25,7 +25,7 @@ TEST_CASE("CellBuffer") {
SECTION("InsertOneLine") {
bool startSequence = false;
- const char *cpChange = cb.InsertString(0, sText, sLength, startSequence);
+ const char *cpChange = cb.InsertString(0, sText, static_cast<int>(sLength), startSequence);
REQUIRE(startSequence);
REQUIRE(sLength == cb.Length());
REQUIRE(memcmp(cpChange, sText, sLength) == 0);
@@ -33,7 +33,7 @@ TEST_CASE("CellBuffer") {
REQUIRE(0 == cb.LineStart(0));
REQUIRE(0 == cb.LineFromPosition(0));
REQUIRE(sLength == cb.LineStart(1));
- REQUIRE(0 == cb.LineFromPosition(sLength));
+ REQUIRE(0 == cb.LineFromPosition(static_cast<int>(sLength)));
REQUIRE(cb.CanUndo());
REQUIRE(!cb.CanRedo());
}
@@ -42,7 +42,7 @@ TEST_CASE("CellBuffer") {
const char sText2[] = "Two\nLines";
const size_t sLength2 = strlen(sText2);
bool startSequence = false;
- const char *cpChange = cb.InsertString(0, sText2, sLength2, startSequence);
+ const char *cpChange = cb.InsertString(0, sText2, static_cast<int>(sLength), startSequence);
REQUIRE(startSequence);
REQUIRE(sLength2 == cb.Length());
REQUIRE(memcmp(cpChange, sText2, sLength2) == 0);
@@ -52,7 +52,7 @@ TEST_CASE("CellBuffer") {
REQUIRE(4 == cb.LineStart(1));
REQUIRE(1 == cb.LineFromPosition(5));
REQUIRE(sLength2 == cb.LineStart(2));
- REQUIRE(1 == cb.LineFromPosition(sLength2));
+ REQUIRE(1 == cb.LineFromPosition(static_cast<int>(sLength)));
REQUIRE(cb.CanUndo());
REQUIRE(!cb.CanRedo());
}
@@ -62,7 +62,7 @@ TEST_CASE("CellBuffer") {
cb.SetUndoCollection(false);
REQUIRE(!cb.IsCollectingUndo());
bool startSequence = false;
- const char *cpChange = cb.InsertString(0, sText, sLength, startSequence);
+ const char *cpChange = cb.InsertString(0, sText, static_cast<int>(sLength), startSequence);
REQUIRE(!startSequence);
REQUIRE(sLength == cb.Length());
REQUIRE(memcmp(cpChange, sText, sLength) == 0);
@@ -74,7 +74,7 @@ TEST_CASE("CellBuffer") {
const char sTextDeleted[] = "ci";
const char sTextAfterDeletion[] = "Sntilla";
bool startSequence = false;
- const char *cpChange = cb.InsertString(0, sText, sLength, startSequence);
+ const char *cpChange = cb.InsertString(0, sText, static_cast<int>(sLength), startSequence);
REQUIRE(startSequence);
REQUIRE(sLength == cb.Length());
REQUIRE(memcmp(cpChange, sText, sLength) == 0);
@@ -134,7 +134,7 @@ TEST_CASE("CellBuffer") {
cb.SetReadOnly(true);
REQUIRE(cb.IsReadOnly());
bool startSequence = false;
- cb.InsertString(0, sText, sLength, startSequence);
+ cb.InsertString(0, sText, static_cast<int>(sLength), startSequence);
REQUIRE(cb.Length() == 0);
}