llvm-6502/unittests/ADT
Jakob Stoklund Olesen 7f1d6d688f Add an assertion for a likely ilist::splice() contract violation.
The single-element ilist::splice() function supports a noop move:

  List.splice(I, List, I);

The corresponding std::list function doesn't allow that, so add a unit
test to document that behavior.

This also means that

  List.splice(I, List, F);

is somewhat surprisingly not equivalent to

  List.splice(I, List, F, next(F));

This patch adds an assertion to catch the illegal case I == F above.
Alternatively, we could make I == F a legal noop, but that would make
ilist differ even more from std::list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170443 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 19:28:37 +00:00
..
APFloatTest.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
APIntTest.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
BitVectorTest.cpp
CMakeLists.txt
DAGDeltaAlgorithmTest.cpp
DeltaAlgorithmTest.cpp
DenseMapTest.cpp
DenseSetTest.cpp
FoldingSet.cpp
HashingTest.cpp
ilistTest.cpp Add an assertion for a likely ilist::splice() contract violation. 2012-12-18 19:28:37 +00:00
ImmutableMapTest.cpp
ImmutableSetTest.cpp
IntEqClassesTest.cpp
IntervalMapTest.cpp
IntrusiveRefCntPtrTest.cpp
Makefile
PackedVectorTest.cpp
SCCIteratorTest.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
SmallPtrSetTest.cpp
SmallStringTest.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
SmallVectorTest.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
SparseBitVectorTest.cpp
SparseSetTest.cpp
StringMapTest.cpp
StringRefTest.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
TinyPtrVectorTest.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
TripleTest.cpp
TwineTest.cpp Sort the #include lines for unittest/... 2012-12-04 10:23:08 +00:00
VariadicFunctionTest.cpp