From 034d5f99dcda138c261421b22c29c0994ff55b14 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 8 Jan 2016 00:16:14 +0100 Subject: [PATCH] fix and adjust various test fixtures due to the new automatic string conversion in operator<< the representation of objects has changed occasionally. I've investigated and verified all those incidents. --- src/lib/format-cout.hpp | 2 +- tests/12metaprogramming.tests | 6 +++--- tests/15library.tests | 20 ++++++++++---------- tests/45controller.tests | 10 +++++----- tests/48proc-operate.tests | 4 ++-- tests/library/iter-source-test.cpp | 4 ++-- tests/library/meta/access-casted-test.cpp | 6 +++--- tests/library/removefromsettest.cpp | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/lib/format-cout.hpp b/src/lib/format-cout.hpp index e757916bd..1349327b5 100644 --- a/src/lib/format-cout.hpp +++ b/src/lib/format-cout.hpp @@ -93,7 +93,7 @@ namespace std { operator<< (ostream& os, X const* ptr) { if (ptr) - return util::showAddr(os, ptr) << " ↗" << *ptr; + return util::showAddr(os, ptr) << " ↗" << lib::meta::CustomStringConv::invoke (*ptr); else return os << "⟂ «" << lib::meta::typeStr() << "»"; } diff --git a/tests/12metaprogramming.tests b/tests/12metaprogramming.tests index 1e405b381..295ba9de0 100644 --- a/tests/12metaprogramming.tests +++ b/tests/12metaprogramming.tests @@ -229,11 +229,11 @@ END TEST "Iterable data source" IterSource_test 13 < [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ] -out-lit: removed 0 ---> [ 1, 2, 3, 4, 5, 6, 7, 8, 9, ] -out-lit: removed 9 ---> [ 0, 1, 2, 3, 4, 5, 6, 7, 8, ] -out-lit: removed 5 ---> [ 0, 1, 2, 3, 4, 6, 7, 8, 9, ] -out-lit: removed 0 2 4 6 8 ---> [ 1, 3, 5, 7, 9, ] -out-lit: removed 1 3 5 7 9 ---> [ 0, 2, 4, 6, 8, ] -out-lit: removed 0 1 2 3 4 5 6 7 8 9 ---> [ ] -out-lit: removed 0 1 2 3 4 5 6 7 8 ---> [ 9, ] -out-lit: removed 1 2 3 4 5 6 7 8 9 ---> [ 0, ] -out-lit: removed 0 1 2 3 4 6 7 8 9 ---> [ 5, ] +out-lit: removed nothing ---> [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] +out-lit: removed 0 ---> [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] +out-lit: removed 9 ---> [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] +out-lit: removed 5 ---> [ 0, 1, 2, 3, 4, 6, 7, 8, 9 ] +out-lit: removed 0 2 4 6 8 ---> [ 1, 3, 5, 7, 9 ] +out-lit: removed 1 3 5 7 9 ---> [ 0, 2, 4, 6, 8 ] +out-lit: removed 0 1 2 3 4 5 6 7 8 9 ---> [ ] +out-lit: removed 0 1 2 3 4 5 6 7 8 ---> [ 9 ] +out-lit: removed 1 2 3 4 5 6 7 8 9 ---> [ 0 ] +out-lit: removed 0 1 2 3 4 6 7 8 9 ---> [ 5 ] END diff --git a/tests/45controller.tests b/tests/45controller.tests index abeff8e33..2421fe2e1 100644 --- a/tests/45controller.tests +++ b/tests/45controller.tests @@ -26,19 +26,19 @@ out: Command-State. arguments=Closure\(.+s.*,Lumiera rocks,..\), . +out: modified: Command-State. arguments=Closure\(123ms,unbelievable,..\), . out: copied : Command-State. arguments=Closure\(.+s.*,Lumiera rocks,..\), . -out: undo... memento=START...doIt\( Time=.+s.* "Lumiera rocks" rand=.. \)undoIt\(time=0:..:....00\)----memento-:START...Lumiera rocksLumiera rocks -out: RESET...undoIt\(time=0:..:....00\)----memento-:START...doIt\( Time=.+s.* "Lumiera rocks" rand=.. \)undoIt\(time=0:..:....00\)----memento-:START...Lumiera rocksLumiera rocks +out: undo... memento=START...doIt\( Time=.+s.* "Lumiera rocks" rand=.. \)undoIt\(time=.+s\)----memento-:START...Lumiera rocksLumiera rocks +out: RESET...undoIt\(time=.+s\)----memento-:START...doIt\( Time=.+s.* "Lumiera rocks" rand=.. \)undoIt\(time=.+s\)----memento-:START...Lumiera rocksLumiera rocks END TEST "build argument accepting function" ArgumentTupleAccept_test <::iterator StringIter; typedef IterSource::iterator TimeIter; - typedef std::map TreeMap; + typedef std::map TreeMap; typedef std::unordered_map HashMap; - typedef std::multimap TreeMultimap; + typedef std::multimap TreeMultimap; typedef std::unordered_multimapHashMultimap; diff --git a/tests/library/meta/access-casted-test.cpp b/tests/library/meta/access-casted-test.cpp index 47ecde2f3..5e791114d 100644 --- a/tests/library/meta/access-casted-test.cpp +++ b/tests/library/meta/access-casted-test.cpp @@ -71,9 +71,9 @@ namespace test { using lib::test::tyAbbr; - ostream& operator<< (ostream& s, const B& b) { return s << "B{} adr="<<&b<<" type: "<