source: trunk/test/date_test.cc @ 1127

Last change on this file since 1127 was 1127, checked in by Peter Johansson, 11 years ago

updating copyright statements

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