summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/cfgas_formatstring.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-06-05 09:53:06 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-05 14:11:19 +0000
commit6c5ea100a7d2531576037b17d5631dde42846b84 (patch)
tree70a5d02ef15a4354448be93926d79b5437c1b84c /xfa/fgas/crt/cfgas_formatstring.cpp
parent7211eac14643bbbaf41bfc205c244668f46be440 (diff)
downloadpdfium-6c5ea100a7d2531576037b17d5631dde42846b84.tar.xz
Add start of CFGAS_FormatString tests
This CL adds tests for the date parsing and formatting code in CFGAS_FormatString. Change-Id: I9989cdd1b3f92c90d46ee2c3f7838fe1de255be2 Reviewed-on: https://pdfium-review.googlesource.com/6178 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fgas/crt/cfgas_formatstring.cpp')
-rw-r--r--xfa/fgas/crt/cfgas_formatstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fgas/crt/cfgas_formatstring.cpp b/xfa/fgas/crt/cfgas_formatstring.cpp
index aa8f53aaf0..d0cb479d26 100644
--- a/xfa/fgas/crt/cfgas_formatstring.cpp
+++ b/xfa/fgas/crt/cfgas_formatstring.cpp
@@ -1984,7 +1984,6 @@ bool CFGAS_FormatString::ParseDateTime(const CFX_WideString& wsSrcDateTime,
FX_DATETIMETYPE eDateTimeType,
CFX_DateTime* dtValue) {
dtValue->Reset();
-
if (wsSrcDateTime.IsEmpty() || wsPattern.IsEmpty())
return false;
@@ -2592,7 +2591,8 @@ bool CFGAS_FormatString::FormatDateTime(const CFX_WideString& wsSrcDateTime,
if (wsSrcDateTime.IsEmpty() || wsPattern.IsEmpty())
return false;
- CFX_WideString wsDatePattern, wsTimePattern;
+ CFX_WideString wsDatePattern;
+ CFX_WideString wsTimePattern;
IFX_Locale* pLocale = nullptr;
FX_DATETIMETYPE eCategory =
GetDateTimeFormat(wsPattern, pLocale, wsDatePattern, wsTimePattern);