From 1b3483eceb0dedb42f5b58a9d6b4e203cafd4d43 Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Tue, 5 Mar 2013 09:42:45 -0800 Subject: [PATCH] Tidy --- tests/test-audio-info.cc | 5 ++++- tests/test-utils.cc | 2 +- tests/test.cc | 2 +- tests/test.h | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test-audio-info.cc b/tests/test-audio-info.cc index 49438e9..e550730 100644 --- a/tests/test-audio-info.cc +++ b/tests/test-audio-info.cc @@ -59,6 +59,9 @@ void test_audio_info() {"2ch-44100Hz-V2.mp3", {"MP3 (MPEG audio layer 3)", 64000, 44100, 0, 2, MP3_T}}, }; for (const auto& item : files) { - run([&] () { test_file(item.first, item.second); }, "audio info: " + item.first); + run( + "audio info: " + item.first, + [&] () { test_file(item.first, item.second); } + ); } } diff --git a/tests/test-utils.cc b/tests/test-utils.cc index 476be64..276c451 100644 --- a/tests/test-utils.cc +++ b/tests/test-utils.cc @@ -43,5 +43,5 @@ static void test_vercmp() void test_utils() { - run(test_vercmp, "vercmp"); + run("vercmp", test_vercmp); } diff --git a/tests/test.cc b/tests/test.cc index 5031c6e..5339f12 100644 --- a/tests/test.cc +++ b/tests/test.cc @@ -37,7 +37,7 @@ int main() } } -void run(std::function func, const std::string& message) +void run(const std::string& message, std::function func) { std::cerr << message << std::endl; func(); diff --git a/tests/test.h b/tests/test.h index 718d3f1..7fa8a78 100644 --- a/tests/test.h +++ b/tests/test.h @@ -24,7 +24,7 @@ #include #include -void run(std::function func, const std::string& message); +void run(const std::string& message, std::function func); extern int g_total; extern int g_passes;