[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/005 c0a93cf 03/10: Reorder currency unit tes
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/005 c0a93cf 03/10: Reorder currency unit tests |
Date: |
Thu, 21 Jan 2021 17:48:15 -0500 (EST) |
branch: valyuta/005
commit c0a93cfcca6f428b2503ff1a8c9e342cc4bf4ff4
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Reorder currency unit tests
Arranged ctor tests in ctor declaration order.
---
currency_test.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/currency_test.cpp b/currency_test.cpp
index 18a7da1..54112f4 100644
--- a/currency_test.cpp
+++ b/currency_test.cpp
@@ -42,8 +42,8 @@ class currency_test
private:
static void test_something();
static void test_default_ctor();
- static void test_explicit_ctor();
static void test_copy_ctor();
+ static void test_explicit_ctor();
static void test_negation();
static void test_plus_or_minus_eq();
static void test_plus_or_minus();
@@ -62,8 +62,8 @@ void currency_test::test()
{
test_something();
test_default_ctor();
- test_explicit_ctor();
test_copy_ctor();
+ test_explicit_ctor();
test_negation();
test_plus_or_minus_eq();
test_plus_or_minus();
@@ -88,12 +88,6 @@ void currency_test::test_default_ctor()
BOOST_TEST( 0 == a0.m_);
}
-void currency_test::test_explicit_ctor()
-{
- currency const a1(325, raw_cents{});
- BOOST_TEST_EQUAL( 325, a1.m_);
-}
-
void currency_test::test_copy_ctor()
{
currency const a1(325, raw_cents{});
@@ -103,6 +97,12 @@ void currency_test::test_copy_ctor()
BOOST_TEST_EQUAL( 325, copy1.m_);
}
+void currency_test::test_explicit_ctor()
+{
+ currency const a1(325, raw_cents{});
+ BOOST_TEST_EQUAL( 325, a1.m_);
+}
+
void currency_test::test_negation()
{
currency const a1(321, raw_cents{});
- [lmi-commits] [lmi] valyuta/005 updated (133d646 -> 9e42155), Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 d763c34 04/10: Clean up, Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 2712277 02/10: Default class currency's special member functions, Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 86cba7f 09/10: Temporarily don't use currency class, Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 7f6a453 01/10: Revert "Partially revert the last commit", Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 c0a93cf 03/10: Reorder currency unit tests,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/005 e40980b 05/10: Optionally detect nonintegral cents at run time, Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 61396fd 06/10: Expunge the unclean macro just added, Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 4b0bf87 07/10: Detect nonintegral cents along every path, Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 6767160 08/10: Temporarily don't use cents, Greg Chicares, 2021/01/21
- [lmi-commits] [lmi] valyuta/005 9e42155 10/10: Undo temporary changes: use currency class with cents, Greg Chicares, 2021/01/21