lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 449ac4e 3/5: Replace a casual comment with a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 449ac4e 3/5: Replace a casual comment with a unit test
Date: Sun, 23 Apr 2017 15:37:32 -0400 (EDT)

branch: master
commit 449ac4e50d65abfc0bf2ec8a1b3601aefb6f301b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Replace a casual comment with a unit test
---
 value_cast_test.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/value_cast_test.cpp b/value_cast_test.cpp
index f686c87..863e906 100644
--- a/value_cast_test.cpp
+++ b/value_cast_test.cpp
@@ -139,8 +139,11 @@ int test_main(int, char*[])
 
     // Forbidden narrowing conversions.
 
-    // A good compiler should warn about this conversion.
-//    value_cast<unsigned int>(-1);
+    BOOST_TEST_THROW
+        (value_cast<unsigned int>(-1)
+        ,std::runtime_error
+        ,"Cannot cast negative to unsigned."
+        );
 
     // Forbidden truncation.
 



reply via email to

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