source: trunk/test/date_test.cc @ 847

Last change on this file since 847 was 847, checked in by Peter Johansson, 12 years ago

updating copyrights

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1// $Id: date_test.cc 847 2009-11-17 01:38:52Z peter $
2
3/*
4  Copyright (C) 2007, 2008 Jari Häkkinen, 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 3 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 svndigest. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#include "Date.h"
23
24#include <iostream>
25#include <string>
26
27int main(const int argc,const char* argv[])
28{
29  using namespace theplu::svndigest;
30  bool ok=true;
31
32  Date date("2007-06-27T15:40:52.123456Z");
33  if (date("%H:%M")!="15:40"){
34    ok = false;
35    std::cerr << "date(\"%H:%M\") returns: " << date("%H:%M")
36              << "\nexpected '15:40'" << std::endl;
37  }
38     
39  if (ok)
40    return 0;
41  return -1;
42}
43
Note: See TracBrowser for help on using the repository browser.