tests/file_main.cc
author Alpar Juttner <alpar@cs.elte.hu>
Sun, 11 Dec 2011 11:19:39 +0100
changeset 11 cf6519daa7fa
parent 10 tests/main.cc@d7ce0311ece2
child 12 4eab99ff2666
permissions -rw-r--r--
Refactoring and test instance in test logs
alpar@10
     1
#include <benchmark_tools.h>
alpar@11
     2
#include <istream>
alpar@11
     3
#include <lemon/error.h>
alpar@10
     4
alpar@10
     5
using namespace lemon;
alpar@10
     6
alpar@11
     7
std::string instance_name;
alpar@11
     8
alpar@11
     9
int testMain(std::istream &input);
alpar@10
    10
alpar@10
    11
int main(int argc, char **argv)
alpar@10
    12
{
alpar@11
    13
  if(argc!=2) exit(1);
alpar@11
    14
alpar@11
    15
  std::ifstream input;
alpar@11
    16
  input.open((DATADIR_PATH+"/"+argv[1]).c_str());
alpar@11
    17
  
alpar@11
    18
  instance_name = argv[1];
alpar@11
    19
alpar@10
    20
  Timer ti;
alpar@11
    21
  testMain(input);
alpar@10
    22
  logTime("total",ti);
alpar@10
    23
}