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 --- testing/fx_string_testhelpers.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testing/fx_string_testhelpers.cpp') diff --git a/testing/fx_string_testhelpers.cpp b/testing/fx_string_testhelpers.cpp index 934dd680e4..00a13f5b57 100644 --- a/testing/fx_string_testhelpers.cpp +++ b/testing/fx_string_testhelpers.cpp @@ -6,6 +6,7 @@ #include #include +#include namespace { @@ -46,3 +47,12 @@ std::ostream& operator<<(std::ostream& out, const CFX_WideStringC& str) { std::ostream& operator<<(std::ostream& out, const CFX_WideString& str) { return output_string(out, str); } + +std::ostream& operator<<(std::ostream& os, const CFX_DateTime& dt) { + os << dt.GetYear() << "-" << std::to_string(dt.GetMonth()) << "-" + << std::to_string(dt.GetDay()) << " " << std::to_string(dt.GetHour()) + << ":" << std::to_string(dt.GetMinute()) << ":" + << std::to_string(dt.GetSecond()) << "." + << std::to_string(dt.GetMillisecond()); + return os; +} -- cgit v1.2.3