lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 195d544 07/12: Improve explanation of certain


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 195d544 07/12: Improve explanation of certain unit tests
Date: Sat, 24 Oct 2020 16:51:34 -0400 (EDT)

branch: master
commit 195d5444cf135be0b1e239bccaf66300f7ef7b20
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Improve explanation of certain unit tests
---
 xml_serialize_test.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/xml_serialize_test.cpp b/xml_serialize_test.cpp
index c6618c6..1ebe87c 100644
--- a/xml_serialize_test.cpp
+++ b/xml_serialize_test.cpp
@@ -153,9 +153,18 @@ int test_main(int, char*[])
     // documentation for value_cast<>().
     BOOST_TEST(d0 == d1);
     BOOST_TEST_EQUAL(d0, d1);
+
     BOOST_TEST(s0 == s1);
     BOOST_TEST_EQUAL(s0, s1);
-    // BOOST_TEST_EQUAL(v0, v1); // No--couldn't display if not equal.
+
+    // BOOST_TEST_EQUAL() inserts unequal values into an ostream, so
+    // it can only be used with streamable types (as above).
+
+    // For Containers, test both
+    //   P: c0 == c1
+    //   Q: c0.size() == c1.size()
+    // even though P implies Q, because Q AND ~P is easy to detect.
+
     BOOST_TEST(v0 == v1);
     BOOST_TEST_EQUAL(v0.size(), v1.size());
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]