[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 6805835 4/6: Shorten long lines
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 6805835 4/6: Shorten long lines |
Date: |
Sat, 28 Jan 2017 04:52:22 +0000 (UTC) |
branch: master
commit 68058351caca4150fe5a77acc3730ef47647aa1a
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Shorten long lines
---
input_seq_test.cpp | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/input_seq_test.cpp b/input_seq_test.cpp
index 2a8258d..3c3e018 100644
--- a/input_seq_test.cpp
+++ b/input_seq_test.cpp
@@ -46,11 +46,12 @@ void check
bool const bv = v == std::vector<double>(d, d + n);
if(!bv)
{
+ using osid = std::ostream_iterator<double>;
std::cout << "\nExpression: '" << e << '\'';
std::cout << "\n expected: ";
- std::copy(d, d + n, std::ostream_iterator<double>(std::cout, " "));
+ std::copy(d , d + n , osid(std::cout, " "));
std::cout << "\n but got: ";
- std::copy(v.begin(), v.end(), std::ostream_iterator<double>(std::cout,
" "));
+ std::copy(v.begin(), v.end(), osid(std::cout, " "));
std::cout << std::endl;
}
@@ -63,11 +64,12 @@ void check
bool const bs = s == t;
if(!bs)
{
+ using osis = std::ostream_iterator<std::string>;
std::cout << "\nExpression: '" << e << '\'';
std::cout << "\n expected: ";
- std::copy(t.begin(), t.end(),
std::ostream_iterator<std::string>(std::cout, "|"));
+ std::copy(t.begin(), t.end(), osis(std::cout, "|"));
std::cout << "\n but got: ";
- std::copy(s.begin(), s.end(),
std::ostream_iterator<std::string>(std::cout, "|"));
+ std::copy(s.begin(), s.end(), osis(std::cout, "|"));
std::cout << std::endl;
}
@@ -273,7 +275,7 @@ int test_main(int, char*[])
{
int const n = 10;
double const d[n] = {0, 12.25, 0, 27.875, 0, 1.0625, 7.5, 7.5, 7.5, 7.5};
- std::string const e("12.25 [1, @92); 27.875 address@hidden, @93]; 1.0625
(@94, 5]; 7.5");
+ std::string const e("12.25 [1,@92); 27.875 address@hidden,@93]; 1.0625
(@94,5]; 7.5");
check(__FILE__, __LINE__, d, n, e);
}
- [lmi-commits] [lmi] master updated (81185a8 -> 11eedff), Greg Chicares, 2017/01/27
- [lmi-commits] [lmi] master bd7b696 5/6: Improve concinnity, Greg Chicares, 2017/01/27
- [lmi-commits] [lmi] master 11eedff 6/6: Improve concinnity, Greg Chicares, 2017/01/27
- [lmi-commits] [lmi] master 795707f 1/6: Prefer braced-init-list to push_back, Greg Chicares, 2017/01/27
- [lmi-commits] [lmi] master 4209d20 2/6: Further strengthen input-sequence unit test, Greg Chicares, 2017/01/27
- [lmi-commits] [lmi] master 6805835 4/6: Shorten long lines,
Greg Chicares <=
- [lmi-commits] [lmi] master 6921ed7 3/6: Belay array decay, Greg Chicares, 2017/01/27