1 | // $Id: date_test.cc 1162 2010-08-13 17:30:03Z 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 "Suite.h" |
---|
24 | |
---|
25 | #include "lib/Date.h" |
---|
26 | |
---|
27 | #include <iostream> |
---|
28 | #include <string> |
---|
29 | |
---|
30 | int main(int argc, char* argv[]) |
---|
31 | { |
---|
32 | using namespace theplu::svndigest; |
---|
33 | test::Suite suite(argc, argv); |
---|
34 | |
---|
35 | Date date("2007-06-27T15:40:52.123456Z"); |
---|
36 | if (date("%H:%M")!="15:40"){ |
---|
37 | suite.add(false); |
---|
38 | std::cerr << "date(\"%H:%M\") returns: " << date("%H:%M") |
---|
39 | << "\nexpected '15:40'" << std::endl; |
---|
40 | } |
---|
41 | |
---|
42 | return suite.exit_status(); |
---|
43 | } |
---|
44 | |
---|