This commit is contained in:
Alexander Kojevnikov 2013-03-05 09:42:45 -08:00
parent 43bc87da6c
commit 1b3483eceb
4 changed files with 7 additions and 4 deletions

View File

@ -59,6 +59,9 @@ void test_audio_info()
{"2ch-44100Hz-V2.mp3", {"MP3 (MPEG audio layer 3)", 64000, 44100, 0, 2, MP3_T}}, {"2ch-44100Hz-V2.mp3", {"MP3 (MPEG audio layer 3)", 64000, 44100, 0, 2, MP3_T}},
}; };
for (const auto& item : files) { 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); }
);
} }
} }

View File

@ -43,5 +43,5 @@ static void test_vercmp()
void test_utils() void test_utils()
{ {
run(test_vercmp, "vercmp"); run("vercmp", test_vercmp);
} }

View File

@ -37,7 +37,7 @@ int main()
} }
} }
void run(std::function<void ()> func, const std::string& message) void run(const std::string& message, std::function<void ()> func)
{ {
std::cerr << message << std::endl; std::cerr << message << std::endl;
func(); func();

View File

@ -24,7 +24,7 @@
#include <iostream> #include <iostream>
#include <string> #include <string>
void run(std::function<void ()> func, const std::string& message); void run(const std::string& message, std::function<void ()> func);
extern int g_total; extern int g_total;
extern int g_passes; extern int g_passes;