[PATCH] D139513: [ADT] Use std::nullopt instead of llvm::None in OptionalTest.cpp
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 10:07:51 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8f9d28d85977: [ADT] Use std::nullopt instead of llvm::None in OptionalTest.cpp (authored by kazu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139513/new/
https://reviews.llvm.org/D139513
Files:
llvm/unittests/ADT/OptionalTest.cpp
Index: llvm/unittests/ADT/OptionalTest.cpp
===================================================================
--- llvm/unittests/ADT/OptionalTest.cpp
+++ llvm/unittests/ADT/OptionalTest.cpp
@@ -813,16 +813,17 @@
TEST(OptionalTest, UseInUnitTests) {
// Test that we invoke the streaming operators when pretty-printing values in
// EXPECT macros.
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(llvm::None, ComparableAndStreamable::get()),
- "Expected equality of these values:\n"
- " llvm::None\n"
- " Which is: None\n"
- " ComparableAndStreamable::get()\n"
- " Which is: ComparableAndStreamable");
+ EXPECT_NONFATAL_FAILURE(
+ EXPECT_EQ(std::nullopt, ComparableAndStreamable::get()),
+ "Expected equality of these values:\n"
+ " std::nullopt\n"
+ " Which is: None\n"
+ " ComparableAndStreamable::get()\n"
+ " Which is: ComparableAndStreamable");
// Test that it is still possible to compare objects which do not have a
// custom streaming operator.
- EXPECT_NONFATAL_FAILURE(EXPECT_EQ(llvm::None, Comparable::get()), "object");
+ EXPECT_NONFATAL_FAILURE(EXPECT_EQ(std::nullopt, Comparable::get()), "object");
}
TEST(OptionalTest, HashValue) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139513.481346.patch
Type: text/x-patch
Size: 1326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221208/e892026c/attachment.bin>
More information about the llvm-commits
mailing list