source: branches/0.6-stable/test/date.cc @ 764

Last change on this file since 764 was 731, checked in by Peter Johansson, 15 years ago

update copyright statements

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1// $Id: date.cc 731 2008-12-15 19:03:04Z peter $
2
3/*
4  Copyright (C) 2007, 2008 Peter Johansson
5
6  This file is part of svndigest, http://dev.thep.lu.se/svndigest
7
8  svndigest is free software; you can redistribute it and/or modify it
9  under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12
13  svndigest is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21  02111-1307, USA.
22*/
23
24#include "Date.h"
25
26#include <iostream>
27#include <string>
28
29int main(const int argc,const char* argv[])
30{
31  using namespace theplu::svndigest;
32  bool ok=true;
33
34  Date date("2007-06-27T15:40:52.123456Z");
35  if (date("%H:%M")!="15:40"){
36    ok = false;
37    std::cerr << "date(\"%H:%M\") returns: " << date("%H:%M")
38              << "\nexpected '15:40'" << std::endl;
39  }
40     
41  if (ok)
42    return 0;
43  return -1;
44}
45
Note: See TracBrowser for help on using the repository browser.