Changeset 24 for trunk/test/tree.cc


Ignore:
Timestamp:
Jan 2, 2006, 9:20:46 AM (16 years ago)
Author:
Peter Johansson
Message:

added trivial test for classes and modified tree to go for the full monty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/tree.cc

    r18 r24  
    55#include <string>
    66#include <iostream>
     7#include <ctime>
    78
    89int main(const int argc,const char* argv[])
     
    1011  using namespace theplu::svnstat;
    1112
    12   bool print = (argc>1 && argv[1]==std::string("-p"));
     13  tm q;
     14  std::cout << "== tm struct ==" << std::endl;
     15  std::cout << q.tm_sec << std::endl;
     16  std::cout << q.tm_min << std::endl;
     17  std::cout << q.tm_hour << std::endl;
     18  std::cout << q.tm_mday << std::endl;
     19  std::cout << q.tm_mon << std::endl;
     20  std::cout << q.tm_year << std::endl;
     21  std::cout << q.tm_wday << std::endl;
     22  std::cout << q.tm_yday << std::endl;
     23  char* blaj = asctime(&q);
     24  std::cout << *blaj << std::endl;
     25  time_t tjo = mktime(&q);
     26  std::cout << tjo << std::endl;
     27
     28  //  bool print = (argc>1 && argv[1]==std::string("-p"));
    1329  bool ok = true;
    1430
    15   Directory tree(std::string("."));
     31  Directory tree(std::string("c++_tools"));
    1632
    17   std::cout << "================ Before purge" << std::endl;
    18   if (print)
    19     tree.print();
    20 
    21   std::cout << "================ Purging" << std::endl;
    2233  tree.purge();
    23 
    24   std::cout << "================ After purge" << std::endl;
    25   if (print)
    26     tree.print();
    27 
     34  tree.parse();
     35  tree.print("svnstat_output/");
     36 
    2837  return (ok ? 0 : -1);
    2938}
Note: See TracChangeset for help on using the changeset viewer.