From ec0e53dc6711aeb827eccd65b6f0779aa841aad2 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 2 Jan 2024 10:08:16 +1100 Subject: Fix warnings in test case code mostly by adding const. --- test/unit/testSparseVector.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/unit/testSparseVector.cxx') 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 sc(std::move(s)); // Move assignment + SparseVector s2; SparseVector 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)); } -- cgit v1.2.3