[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b282c3f 1/8: Add simple unit tests
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b282c3f 1/8: Add simple unit tests |
Date: |
Sat, 17 Mar 2018 19:12:56 -0400 (EDT) |
branch: master
commit b282c3fe9105a783078dfc2fe5d4ccd2a84f3cc5
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Add simple unit tests
---
miscellany_test.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/miscellany_test.cpp b/miscellany_test.cpp
index 8c483e5..b8ecebd 100644
--- a/miscellany_test.cpp
+++ b/miscellany_test.cpp
@@ -293,6 +293,14 @@ void test_prefix_and_suffix()
BOOST_TEST(!ends_with (s, "KLMNOP"));
}
+void test_scale_power()
+{
+ BOOST_TEST_EQUAL( 0, scale_power( 9, 0.0,
0.0));
+ BOOST_TEST_EQUAL( 0, scale_power( 9, 0.0,
999'999'999.0));
+ BOOST_TEST_EQUAL( 0, scale_power( 9, -99'999'999.0,
0.0));
+ BOOST_TEST_EQUAL( 0, scale_power( 9, 999'999'999.0,
999'999'999.0));
+}
+
void test_trimming()
{
char const*const superfluous = " ;";
@@ -337,6 +345,7 @@ int test_main(int, char*[])
test_minmax();
test_page_count();
test_prefix_and_suffix();
+ test_scale_power();
test_trimming();
return 0;
- [lmi-commits] [lmi] master updated (566fa11 -> 232d118), Greg Chicares, 2018/03/17
- [lmi-commits] [lmi] master 50b6290 2/8: Add a failing unit test, Greg Chicares, 2018/03/17
- [lmi-commits] [lmi] master ef76b1f 5/8: Fix the failing test just committed, Greg Chicares, 2018/03/17
- [lmi-commits] [lmi] master 99c2c5e 7/8: Augment unit test and documentation, Greg Chicares, 2018/03/17
- [lmi-commits] [lmi] master b282c3f 1/8: Add simple unit tests,
Greg Chicares <=
- [lmi-commits] [lmi] master 2f9e574 4/8: Add a failing unit test, Greg Chicares, 2018/03/17
- [lmi-commits] [lmi] master f053d67 6/8: Reduce trickiness, Greg Chicares, 2018/03/17
- [lmi-commits] [lmi] master a96528d 3/8: Fix the failing test just committed, Greg Chicares, 2018/03/17
- [lmi-commits] [lmi] master 232d118 8/8: Augment unit test, demonstrating the present algorithm's limitations, Greg Chicares, 2018/03/17