[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master af15ad7 4/5: Augment unit test
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master af15ad7 4/5: Augment unit test |
Date: |
Fri, 17 Aug 2018 09:35:39 -0400 (EDT) |
branch: master
commit af15ad71df73758b0532759e4d9c1dda5e98c498
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Augment unit test
---
report_table_test.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/report_table_test.cpp b/report_table_test.cpp
index 580bc8a..0f9cadd 100644
--- a/report_table_test.cpp
+++ b/report_table_test.cpp
@@ -125,6 +125,16 @@ void report_table_test::test_apportion()
std::vector<int> const votes3 = {0, 0, 0};
std::vector<int> const seats3 = {0, 0, 0};
BOOST_TEST(seats3 == apportion(votes3, 7));
+
+ // Test with vectors of one and zero elements.
+
+ std::vector<int> const votes4 = {1};
+ std::vector<int> const seats4 = {7};
+ BOOST_TEST(seats4 == apportion(votes4, 7));
+
+ std::vector<int> const votes5 = {};
+ std::vector<int> const seats5 = {};
+ BOOST_TEST(seats5 == apportion(votes5, 7));
}
void report_table_test::test_bloat()