aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/unit/testDecoration.cxx
diff options
context:
space:
mode:
authorZufu Liu <unknown>2021-06-21 13:35:09 +1000
committerZufu Liu <unknown>2021-06-21 13:35:09 +1000
commit6de6577e1c9f8fad2852abb3b850f563fb7a04c6 (patch)
tree1d1a35fb028ad5a304afd9447311c60b3ba3f920 /test/unit/testDecoration.cxx
parent5b3faa208ea29e45c6d845760bb902c3a9f057da (diff)
downloadscintilla-mirror-rel-5-1-0.tar.gz
Fix some warnings in unit tests.rel-5-1-0
Diffstat (limited to 'test/unit/testDecoration.cxx')
-rw-r--r--test/unit/testDecoration.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/testDecoration.cxx b/test/unit/testDecoration.cxx
index 023b44163..fd43bc238 100644
--- a/test/unit/testDecoration.cxx
+++ b/test/unit/testDecoration.cxx
@@ -22,7 +22,7 @@
#include "catch.hpp"
-const int indicator=4;
+constexpr int indicator=4;
using namespace Scintilla::Internal;
@@ -66,7 +66,7 @@ TEST_CASE("DecorationList") {
}
SECTION("HasCorrectCurrentValue") {
- const int value = 55;
+ constexpr int value = 55;
decol->SetCurrentValue(value);
REQUIRE(value == decol->GetCurrentValue());
}
@@ -74,9 +74,9 @@ TEST_CASE("DecorationList") {
SECTION("ExpandSetValues") {
decol->SetCurrentIndicator(indicator);
decol->InsertSpace(0, 9);
- const int value = 59;
- const Sci::Position position = 4;
- const Sci::Position fillLength = 3;
+ constexpr int value = 59;
+ constexpr Sci::Position position = 4;
+ constexpr Sci::Position fillLength = 3;
auto fr = decol->FillRange(position, value, fillLength);
REQUIRE(fr.changed);
REQUIRE(fr.position == 4);
@@ -85,7 +85,7 @@ TEST_CASE("DecorationList") {
REQUIRE(decol->AllOnFor(5) == (1 << indicator));
REQUIRE(decol->Start(indicator, 5) == 4);
REQUIRE(decol->End(indicator, 5) == 7);
- const int indicatorB=6;
+ constexpr int indicatorB=6;
decol->SetCurrentIndicator(indicatorB);
fr = decol->FillRange(position, value, fillLength);
REQUIRE(fr.changed);