1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/unittests/ADT
Pavel Labath 40e9380144 [ADT] Add streaming operators for llvm::Optional
Summary:
The operators simply print the underlying value or "None".

The trickier part of this patch is making sure the streaming operators
work even in unit tests (which was my primary motivation, though I can
also see them being useful elsewhere). Since the stream operator was a
template, implicit conversions did not kick in, and our gtest glue code
was explicitly introducing an implicit conversion to make sure other
implicit conversions do not kick in :P. I resolve that by specializing
llvm_gtest::StreamSwitch for llvm:Optional<T>.

Reviewers: sammccall, dblaikie

Reviewed By: sammccall

Subscribers: mgorny, dexonsmith, kristina, llvm-commits

Differential Revision: https://reviews.llvm.org/D56795

llvm-svn: 351548
2019-01-18 12:52:03 +00:00
..
AnyTest.cpp [ADT] Only run death tests in !NDEBUG 2018-07-20 22:15:09 +00:00
APFloatTest.cpp APFloat: allow 64-bit of payload 2018-12-10 19:27:38 +00:00
APIntTest.cpp [APInt] Add methods for saturated add and sub 2018-11-20 16:47:59 +00:00
APSIntTest.cpp
ArrayRefTest.cpp Revert "ADT: Move ArrayRef comparison operators into the class" 2018-06-28 12:10:21 +00:00
BitmaskEnumTest.cpp [ADT] Add LLVM_MARK_AS_BITMASK_ENUM, used to enable bitwise operations on enums without static_cast. 2016-07-13 18:23:16 +00:00
BitVectorTest.cpp [ADT] Fix bugs in SmallBitVector. 2018-12-14 18:21:20 +00:00
BreadthFirstIteratorTest.cpp [ADT] Add a generic breadth-first-search graph iterator. 2017-04-06 17:03:04 +00:00
BumpPtrListTest.cpp ADT: Add AllocatorList, and use it for yaml::Token 2016-09-11 22:40:40 +00:00
CMakeLists.txt [ADT] Implemented unittests for ImmutableList 2018-08-13 17:32:48 +00:00
DAGDeltaAlgorithmTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
DeltaAlgorithmTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
DenseMapTest.cpp [ADT] Adds equality operators for DenseMap and DenseSet, and an initializer_list 2018-10-15 15:26:47 +00:00
DenseSetTest.cpp [ADT] Fix a bug in DenseSet's initializer_list constructor. 2018-10-15 18:34:36 +00:00
DepthFirstIteratorTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
EquivalenceClassesTest.cpp [NFC] Add missing unit tests for EquivalenceClasses 2017-11-27 11:20:58 +00:00
FoldingSet.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
FunctionExtrasTest.cpp [ADT] Add llvm::unique_function which is like std::function but 2018-07-02 23:57:29 +00:00
FunctionRefTest.cpp [ADT] Add a default constructor and a bool conversion to function_ref. 2017-07-09 06:12:56 +00:00
HashingTest.cpp Tests: fix tests encoding specific hash values for 32-bit systems. 2018-08-31 19:24:37 +00:00
IListBaseTest.cpp ADT: Add sentinel tracking and custom tags to ilists 2016-09-11 16:20:53 +00:00
IListIteratorTest.cpp Fix some missing negations in the traits checking from r294349 2017-02-07 21:31:03 +00:00
IListNodeBaseTest.cpp ADT: Add sentinel tracking and custom tags to ilists 2016-09-11 16:20:53 +00:00
IListNodeTest.cpp ADT: Add sentinel tracking and custom tags to ilists 2016-09-11 16:20:53 +00:00
IListSentinelTest.cpp Turn LLVM_ENABLE_ABI_BREAKING_CHECKS into a 0/1 definition like 2016-09-30 19:52:27 +00:00
IListTest.cpp ADT: Never allocate nodes in iplist<> and ilist<> 2016-09-11 23:43:43 +00:00
ImmutableListTest.cpp [ADT] Made numerous methods of ImmutableList const 2018-09-12 11:20:15 +00:00
ImmutableMapTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
ImmutableSetTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
IntEqClassesTest.cpp
IntervalMapTest.cpp [ADT] IntervalMap: add overlaps(a, b) method 2018-12-21 13:04:34 +00:00
IntrusiveRefCntPtrTest.cpp [ADT] Attempt to fix GCC warning in IntrusiveRefCntPtrTest. 2017-01-04 22:49:55 +00:00
IteratorTest.cpp [ADT] Add zip_longest iterators. 2018-12-05 00:31:54 +00:00
MakeUniqueTest.cpp
MappedIteratorTest.cpp [ADT] Rewrite mapped_iterator in terms of iterator_adaptor_base. 2017-11-10 17:41:28 +00:00
MapVectorTest.cpp [ADT] Fix MapVector when 'Map::mapped_type != unsigned'. 2018-04-08 08:48:58 +00:00
OptionalTest.cpp [ADT] Add streaming operators for llvm::Optional 2019-01-18 12:52:03 +00:00
PackedVectorTest.cpp
PointerEmbeddedIntTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
PointerIntPairTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
PointerSumTypeTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
PointerUnionTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
PostOrderIteratorTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
PriorityWorklistTest.cpp [ADT] Speculative attempt to fix build bot issues with r290952. 2017-01-04 11:40:18 +00:00
RangeAdapterTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
SCCIteratorTest.cpp Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC. 2017-06-15 21:00:40 +00:00
ScopeExitTest.cpp Give scope_exit helper correct move semantics 2018-01-25 16:55:48 +00:00
SequenceTest.cpp Fix warnings in ImmutableSetTest and SequenceTest. 2016-07-17 18:10:30 +00:00
SetVectorTest.cpp [SetVector] Add erase() method 2016-03-25 19:28:08 +00:00
SimpleIListTest.cpp [ilist_node] Add a getReverseIterator() method and a unittest for it. 2016-11-02 00:59:58 +00:00
SmallPtrSetTest.cpp [unittests] ADT: silence -Wself-assign diagnostics 2018-04-07 10:37:18 +00:00
SmallSetTest.cpp [ADT] Remove illegal comparison of singular iterators from SmallSetTest 2018-10-31 11:00:48 +00:00
SmallStringTest.cpp Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
SmallVectorTest.cpp [ADT] Don't use __used__ attribute on struct members in unit test 2017-06-12 14:19:25 +00:00
SparseBitVectorTest.cpp [ADT] Clean up SparseBitVector copying and make it moveable 2018-11-01 13:55:59 +00:00
SparseMultiSetTest.cpp
SparseSetTest.cpp [ADT] Add a pop_back_val method to the SparseSet container. 2016-03-14 18:10:41 +00:00
StatisticTest.cpp Fix unused function warning in StatisticTest.cpp 2018-03-08 15:52:45 +00:00
STLExtrasTest.cpp 2nd attempt to fix ambiguities because of ADL 2018-10-31 01:58:00 +00:00
StringExtrasTest.cpp [ADT] Support converting to lowercase string in toHex 2018-09-10 19:34:44 +00:00
StringMapTest.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
StringRefTest.cpp [ADT] Add StringRef::rsplit(StringRef Separator). 2018-06-08 12:42:12 +00:00
StringSwitchTest.cpp [ADT] Simplify and optimize StringSwitch 2018-02-26 18:41:26 +00:00
TestGraph.h Add header guards to some headers that are missing them 2018-09-03 16:22:05 +00:00
TinyPtrVectorTest.cpp Ensure moved-from container is cleared on move 2017-12-11 19:22:59 +00:00
TripleTest.cpp [WebAssembly] COWS has been renamed to WASI. 2019-01-16 05:23:52 +00:00
TwineTest.cpp Revert "[ADT] Make Twine's copy constructor private." 2017-10-11 23:54:34 +00:00
VariadicFunctionTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00