aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/unit/testSparseVector.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2024-01-02 10:08:16 +1100
committerNeil <nyamatongwe@gmail.com>2024-01-02 10:08:16 +1100
commitec0e53dc6711aeb827eccd65b6f0779aa841aad2 (patch)
tree4cba13cd182aac11f6240cd8520e5b46a0d329bf /test/unit/testSparseVector.cxx
parentdac59d7a985cd4b42096848c02dcc26b55165493 (diff)
downloadscintilla-mirror-ec0e53dc6711aeb827eccd65b6f0779aa841aad2.tar.gz
Fix warnings in test case code mostly by adding const.
Diffstat (limited to 'test/unit/testSparseVector.cxx')
-rw-r--r--test/unit/testSparseVector.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/unit/testSparseVector.cxx b/test/unit/testSparseVector.cxx
index 3a784d4c2..3a9ac3123 100644
--- a/test/unit/testSparseVector.cxx
+++ b/test/unit/testSparseVector.cxx
@@ -66,8 +66,9 @@ TEST_CASE("CompileCopying SparseVector") {
// Move constructor
SparseVector<UniqueInt> sc(std::move(s));
// Move assignment
+ SparseVector<UniqueInt> s2;
SparseVector<UniqueInt> sd;
- sd = (std::move(s));
+ sd = (std::move(s2));
}
}
@@ -480,7 +481,8 @@ TEST_CASE("SparseTextString") {
REQUIRE("" == st.ValueAt(1));
std::string s25("25");
st.SetValueAt(1, std::move(s25));
- REQUIRE("" == s25); // moved from
+ // Deliberate check of moved from: provokes warning from Visual C++ code analysis
+ REQUIRE("" == s25);
REQUIRE("25" == st.ValueAt(1));
}