aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/test/lldate_tut.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:11 -0500
committerJacek Antonelli2008-08-15 23:45:11 -0500
commit215f423cbe18fe9ca14a26caef918d303bad28ff (patch)
tree0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/test/lldate_tut.cpp
parentSecond Life viewer sources 1.18.3.5-RC (diff)
downloadmeta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to 'linden/indra/test/lldate_tut.cpp')
-rw-r--r--linden/indra/test/lldate_tut.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/linden/indra/test/lldate_tut.cpp b/linden/indra/test/lldate_tut.cpp
index f8813e3..5e6d003 100644
--- a/linden/indra/test/lldate_tut.cpp
+++ b/linden/indra/test/lldate_tut.cpp
@@ -4,7 +4,9 @@
4 * @date 2007-02 4 * @date 2007-02
5 * @brief LLDate test cases. 5 * @brief LLDate test cases.
6 * 6 *
7 * Copyright (c) 2007-2007, Linden Research, Inc. 7 * $LicenseInfo:firstyear=2007&license=viewergpl$
8 *
9 * Copyright (c) 2007, Linden Research, Inc.
8 * 10 *
9 * Second Life Viewer Source Code 11 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 12 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -26,6 +28,7 @@
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE. 30 * COMPLETENESS OR PERFORMANCE.
31 * $/LicenseInfo$
29 */ 32 */
30 33
31#include <tut/tut.h> 34#include <tut/tut.h>
@@ -35,6 +38,7 @@
35#define VALID_DATE "2003-04-30T04:00:00Z" 38#define VALID_DATE "2003-04-30T04:00:00Z"
36#define VALID_DATE_LEAP "2004-02-29T04:00:00Z" 39#define VALID_DATE_LEAP "2004-02-29T04:00:00Z"
37#define VALID_DATE_HOUR_BOUNDARY "2003-04-30T23:59:59Z" 40#define VALID_DATE_HOUR_BOUNDARY "2003-04-30T23:59:59Z"
41#define VALID_DATE_FRACTIONAL_SECS "2007-09-26T20:31:33.70Z"
38 42
39// invalid format 43// invalid format
40#define INVALID_DATE_MISSING_YEAR "-04-30T22:59:59Z" 44#define INVALID_DATE_MISSING_YEAR "-04-30T22:59:59Z"
@@ -88,6 +92,10 @@ namespace tut
88 expected_string = VALID_DATE_HOUR_BOUNDARY; 92 expected_string = VALID_DATE_HOUR_BOUNDARY;
89 ensure_equals("VALID_DATE_HOUR_BOUNDARY failed" , expected_string, date.asString()); 93 ensure_equals("VALID_DATE_HOUR_BOUNDARY failed" , expected_string, date.asString());
90 94
95 result = date.fromString(VALID_DATE_FRACTIONAL_SECS);
96 expected_string = VALID_DATE_FRACTIONAL_SECS;
97 ensure_equals("VALID_DATE_FRACTIONAL_SECS failed" , expected_string, date.asString());
98
91 result = date.fromString(INVALID_DATE_MISSING_YEAR); 99 result = date.fromString(INVALID_DATE_MISSING_YEAR);
92 ensure_equals("INVALID_DATE_MISSING_YEAR should have failed" , result, false); 100 ensure_equals("INVALID_DATE_MISSING_YEAR should have failed" , result, false);
93 101