Skip to content

Commit fff3a84

Browse files
committed
[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
1 parent 8290440 commit fff3a84

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/unittests/DataFormatter/MockTests.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "lldb/DataFormatters/Mock.h"
1010
#include "lldb/Utility/StreamString.h"
1111
#include "llvm/ADT/Optional.h"
12+
#include "llvm/ADT/StringRef.h"
1213
#include "gtest/gtest.h"
1314
#include <string>
1415

@@ -36,5 +37,6 @@ TEST(DataFormatterMockTest, NSDate) {
3637
EXPECT_EQ(formatDateValue(std::numeric_limits<time_t>::max()), llvm::None);
3738
EXPECT_EQ(formatDateValue(std::numeric_limits<time_t>::min()), llvm::None);
3839

39-
EXPECT_EQ(*formatDateValue(0), "2001-01-01 00:00:00 UTC");
40+
EXPECT_TRUE(
41+
llvm::StringRef(*formatDateValue(0)).startswith("2001-01-01 00:00:00"));
4042
}

0 commit comments

Comments
 (0)