34 using boost::any_cast;
35 namespace bfs = boost::filesystem;
49 boost::scoped_ptr<uf::StatsData>
stats;
53 TEST ( HifstStatsTask, basic_test ) {
55 unordered_map<std::string, boost::any> v;
56 const std::string kStatsText =
"stats.text";
60 d.
stats->setTimeStart (
"sirius" );
61 d.
stats->setTimeEnd (
"sirius" );
62 d.
stats->setTimeStart (
"black" );
63 d.
stats->setTimeEnd (
"black" );
74 boost::algorithm::trim ( line );
76 EXPECT_TRUE ( line.substr ( 0, 14 ) ==
"sirius: " 77 || line.substr ( 0, 14 ) ==
"black: ");
79 boost::algorithm::trim ( line );
80 EXPECT_TRUE ( line.substr ( 0, 14 ) ==
"sirius: " 81 || line.substr ( 0, 14 ) ==
"black: ");
82 bfs::remove ( bfs::path ( kStatsText ) );
89 int main (
int argc,
char **argv ) {
90 ::testing::InitGoogleTest ( &argc, argv );
91 return RUN_ALL_TESTS();
Handles simple wildcard expansion for strings.
Relative to Stats across the pipeline.
Task that dumps statistics stored by any previous task in the pipeline.
boost::scoped_ptr< uf::StatsData > stats
Interfaces with basic methods for iteration.
iszfstream & getline(iszfstream &izs, std::string &line)
test-specific classes and functions
Static variables for logger. Include only once from main file.
int main(int argc, char **argv)
Public class with variables required by TextTask to compile and run.
Wrapper stream class that reads pipes, text files or gzipped files.
std::string const kStatsWrite
Unit testing: google testing common header.
Static variable for custom_assert. Include only once from main file.