diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TestClient.hpp | 10 | ||||
-rw-r--r-- | tests/ingen_test.cpp | 2 | ||||
-rw-r--r-- | tests/test_utils.hpp | 18 |
3 files changed, 15 insertions, 15 deletions
diff --git a/tests/TestClient.hpp b/tests/TestClient.hpp index e80557f1..b234d7c2 100644 --- a/tests/TestClient.hpp +++ b/tests/TestClient.hpp @@ -35,14 +35,14 @@ public: void message(const Message& msg) override { if (const Response* const response = boost::get<Response>(&msg)) { if (response->status != Status::SUCCESS) { - _log.error(fmt("error on message %1%: %2% (%3%)\n") - % response->id - % ingen_status_string(response->status) - % response->subject); + _log.error("error on message %1%: %2% (%3%)\n", + response->id, + ingen_status_string(response->status), + response->subject); exit(EXIT_FAILURE); } } else if (const Error* const error = boost::get<Error>(&msg)) { - _log.error(fmt("error: %1%\n") % error->message); + _log.error("error: %1%\n", error->message); exit(EXIT_FAILURE); } } diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index f40499b4..cd86985f 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -149,7 +149,7 @@ main(int argc, char** argv) Sord::Node nil; int n_events = 0; for (;; ++n_events) { - std::string subject_str = (fmt("msg%1%") % n_events).str(); + std::string subject_str = fmt("msg%1%", n_events); Sord::URI subject(*world->rdf_world(), subject_str, (const char*)cmds_file_uri.buf); Sord::Iter iter = cmds->find(subject, nil, nil); diff --git a/tests/test_utils.hpp b/tests/test_utils.hpp index a0cc53ac..c8271325 100644 --- a/tests/test_utils.hpp +++ b/tests/test_utils.hpp @@ -14,27 +14,27 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ -#include <iostream> +#include "ingen/fmt.hpp" -#include <boost/format.hpp> +#include <iostream> -typedef boost::basic_format<char> fmt; +using ingen::fmt; #define EXPECT_TRUE(value) \ if (!(value)) { \ - std::cerr << (fmt("error: %1%:%2%: !%3%\n") % __FILE__ % \ - __LINE__ % (#value)); \ + std::cerr << fmt("error: %1%:%2%: !%3%\n", \ + __FILE__, __LINE__, (#value)); \ } #define EXPECT_FALSE(value) \ if ((value)) { \ - std::cerr << (fmt("error: %1%:%2%: !%3%\n") % __FILE__ % \ - __LINE__ % (#value)); \ + std::cerr << (fmt("error: %1%:%2%: !%3%\n", \ + __FILE__, __LINE__, (#value))); \ } #define EXPECT_EQ(value, expected) \ if (!((value) == (expected))) { \ - std::cerr << (fmt("error: %1%:%2%: %3% != %4%\n") % __FILE__ % \ - __LINE__ % (#value) % (#expected)); \ + std::cerr << fmt("error: %1%:%2%: %3% != %4%\n", \ + __FILE__, __LINE__, (#value), (#expected)); \ std::cerr << "note: actual value: " << value << std::endl; \ } |