#include "Cocoa.h"
+#include "Plugins/Language/ObjC/Utilities.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Core/Mangled.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/DataFormatters/FormattersHelpers.h"
-#include "lldb/DataFormatters/Mock.h"
#include "lldb/DataFormatters/StringPrinter.h"
#include "lldb/DataFormatters/TypeSummary.h"
#include "lldb/Host/Time.h"
-//===-- Mock.h --------------------------------------------------*- C++ -*-===//
+//===-- Utilities.h ---------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
//
//===----------------------------------------------------------------------===//
-#ifndef LLDB_DATAFORMATTERS_MOCK_H
-#define LLDB_DATAFORMATTERS_MOCK_H
+#ifndef LLDB_PLUGINS_LANGUAGE_OBJC_UTILITIES_H
+#define LLDB_PLUGINS_LANGUAGE_OBJC_UTILITIES_H
namespace lldb_private {
} // namespace formatters
} // namespace lldb_private
-#endif // LLDB_DATAFORMATTERS_MOCK_H
+#endif // LLDB_PLUGINS_LANGUAGE_OBJC_UTILITIES_H
-//===-- MockTests.cpp -----------------------------------------------------===//
+//===-- UtilitiesTests.cpp ------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
//
//===----------------------------------------------------------------------===//
-#include "lldb/DataFormatters/Mock.h"
+#include "Plugins/Language/ObjC/Utilities.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
}
TEST(DataFormatterMockTest, NSDate) {
- EXPECT_EQ(*formatDateValue(-63114076800), "0001-12-30 00:00:00 +0000");
+ EXPECT_EQ(formatDateValue(-63114076800),
+ std::string("0001-12-30 00:00:00 +0000"));
// Can't convert the date_value to a time_t.
EXPECT_EQ(formatDateValue((double)(std::numeric_limits<time_t>::max()) + 1),
llvm::None);
// Can't add the macOS epoch to the converted date_value (the add overflows).
- EXPECT_EQ(formatDateValue((double)std::numeric_limits<time_t>::max()), llvm::None);
- EXPECT_EQ(formatDateValue((double)std::numeric_limits<time_t>::min()), llvm::None);
+ EXPECT_EQ(formatDateValue((double)std::numeric_limits<time_t>::max()),
+ llvm::None);
+ EXPECT_EQ(formatDateValue((double)std::numeric_limits<time_t>::min()),
+ llvm::None);
// FIXME: The formatting result is wrong on Windows because we adjust the
// epoch when _WIN32 is defined (see GetOSXEpoch).