[lldb/test] Relax NSDate mock test for non-Apple platforms

On Ubuntu, a formatted date prints as "GMT" instead of "UTC", which is
ok.

http://lab.llvm.org:8011/builders/lldb-aarch64-ubuntu/builds/4520/steps/test/logs/stdio
This commit is contained in:
Vedant Kumar 2020-05-18 15:59:34 -07:00
parent 82904401e3
commit fff3a8464d
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@
#include "lldb/DataFormatters/Mock.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "gtest/gtest.h"
#include <string>
@ -36,5 +37,6 @@ TEST(DataFormatterMockTest, NSDate) {
EXPECT_EQ(formatDateValue(std::numeric_limits<time_t>::max()), llvm::None);
EXPECT_EQ(formatDateValue(std::numeric_limits<time_t>::min()), llvm::None);
EXPECT_EQ(*formatDateValue(0), "2001-01-01 00:00:00 UTC");
EXPECT_TRUE(
llvm::StringRef(*formatDateValue(0)).startswith("2001-01-01 00:00:00"));
}