tests/file_main.cc
changeset 11 cf6519daa7fa
parent 10 d7ce0311ece2
child 12 4eab99ff2666
equal deleted inserted replaced
0:65358eac2c2a 0:b8b9b37dde1a
     1 #include <benchmark_tools.h>
     1 #include <benchmark_tools.h>
       
     2 #include <istream>
       
     3 #include <lemon/error.h>
     2 
     4 
     3 using namespace lemon;
     5 using namespace lemon;
     4 
     6 
     5 int testMain(int argc, char **argv);
     7 std::string instance_name;
       
     8 
       
     9 int testMain(std::istream &input);
     6 
    10 
     7 int main(int argc, char **argv)
    11 int main(int argc, char **argv)
     8 {
    12 {
       
    13   if(argc!=2) exit(1);
       
    14 
       
    15   std::ifstream input;
       
    16   input.open((DATADIR_PATH+"/"+argv[1]).c_str());
       
    17   
       
    18   instance_name = argv[1];
       
    19 
     9   Timer ti;
    20   Timer ti;
    10   testMain(argc, argv);
    21   testMain(input);
    11   logTime("total",ti);
    22   logTime("total",ti);
    12 }
    23 }