From 6c5ea100a7d2531576037b17d5631dde42846b84 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 5 Jun 2017 09:53:06 -0400 Subject: 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 Reviewed-by: Tom Sepez --- xfa/fgas/crt/cfgas_formatstring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fgas/crt/cfgas_formatstring.cpp') 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); -- cgit v1.2.3