|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Aleph::Rope (tpl_rope.H). More...
#include <gtest/gtest.h>#include <tpl_rope.H>#include <atomic>#include <chrono>#include <cstddef>#include <cstdlib>#include <new>#include <random>#include <stdexcept>#include <string>#include <string_view>Go to the source code of this file.
Macros | |
| #define | ALEPH_ROPE_TEST_UNDER_TSAN 0 |
Functions | |
| void * | operator new (std::size_t size) |
| void * | operator new[] (std::size_t size) |
| void * | operator new (std::size_t size, const std::nothrow_t &) noexcept |
| void * | operator new[] (std::size_t size, const std::nothrow_t &) noexcept |
| void | operator delete (void *ptr) noexcept |
| void | operator delete[] (void *ptr) noexcept |
| void | operator delete (void *ptr, std::size_t) noexcept |
| void | operator delete[] (void *ptr, std::size_t) noexcept |
| void | operator delete (void *ptr, const std::nothrow_t &) noexcept |
| void | operator delete[] (void *ptr, const std::nothrow_t &) noexcept |
| TEST (Rope, DefaultConstructedRopeIsEmpty) | |
| TEST (Rope, VerifyHoldsForEmptyAndTrivialRopes) | |
| TEST (Rope, ConstructFromStringView) | |
| TEST (Rope, ConstructFromEmptyStringViewIsEmpty) | |
| TEST (Rope, AtReturnsCorrectCharacters) | |
| TEST (Rope, AtThrowsOutOfRange) | |
| TEST (Rope, ConcatCombinesTwoRopes) | |
| TEST (Rope, ConcatWithEmptyRopeIsIdentity) | |
| TEST (Rope, SubstrExtractsCorrectRange) | |
| TEST (Rope, SubstrThrowsOutOfRange) | |
| TEST (Rope, SubstrOfWholeRopeSharesRoot) | |
| TEST (Rope, InsertSplicesInAnotherRope) | |
| TEST (Rope, InsertAtBoundariesWorks) | |
| TEST (Rope, InsertThrowsOutOfRange) | |
| TEST (Rope, EraseRemovesRange) | |
| TEST (Rope, EraseWholeRopeGivesEmpty) | |
| TEST (Rope, EraseZeroLengthIsIdentity) | |
| TEST (Rope, IdentityEditsDoNotAllocate) | |
| TEST (Rope, EraseThrowsOutOfRange) | |
| TEST (Rope, FlattenReturnsAllCharactersInOrder) | |
| TEST (Rope, EqualityComparesContentNotIdentity) | |
| TEST (Rope, EqualityHandlesMismatchedLeafBoundariesAndSharedSubtrees) | |
| TEST (Rope, CopyIsIndependentOfLaterOperationsOnTheOriginalVariable) | |
| TEST (Rope, TinyLeafSizeStillProducesCorrectResults) | |
| TEST (Rope, RepeatedSingleCharacterConcatStaysCorrect) | |
| TEST (Rope, RepeatedSinglePrependStaysCorrect) | |
| TEST (Rope, SubstrAtExactLeafBoundaries) | |
| TEST (Rope, RandomizedEditScriptMatchesStdString) | |
| TEST (Rope, RepeatedSmallConcatStaysFastEnoughToProveAbsorptionFired) | |
| TEST (Rope, CopyAndSmallConcatStayFastRegardlessOfSourceSize) | |
| TEST (Rope, FailedAllocationDuringConcatLeavesExistingRopesUnchanged) | |
| TEST (Rope, SubstrOfManyLeafRangeStaysCorrectAndFastRegardlessOfTotalSize) | |
| TEST (Rope, RepeatedSelfConcatThrowsOverflowErrorInsteadOfWrappingOrHanging) | |
Tests for Aleph::Rope (tpl_rope.H).
Definition in file rope_test.cc.
| #define ALEPH_ROPE_TEST_UNDER_TSAN 0 |
Definition at line 69 of file rope_test.cc.
|
noexcept |
Definition at line 189 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
|
noexcept |
Definition at line 209 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
|
noexcept |
Definition at line 199 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
|
noexcept |
Definition at line 194 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
|
noexcept |
Definition at line 214 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
|
noexcept |
Definition at line 204 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| void * operator new | ( | std::size_t | size | ) |
Definition at line 155 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::size().
|
noexcept |
Definition at line 165 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::size().
| void * operator new[] | ( | std::size_t | size | ) |
Definition at line 160 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::size().
|
noexcept |
Definition at line 177 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::size().
| TEST | ( | Rope | , |
| AtReturnsCorrectCharacters | |||
| ) |
Definition at line 260 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| AtThrowsOutOfRange | |||
| ) |
Definition at line 268 of file rope_test.cc.
References Aleph::Rope< Char, LeafSize >::at(), Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| ConcatCombinesTwoRopes | |||
| ) |
| TEST | ( | Rope | , |
| ConcatWithEmptyRopeIsIdentity | |||
| ) |
Definition at line 292 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::concat(), Aleph::Rope< Char, LeafSize >::concat(), Aleph::size(), and Aleph::Rope< Char, LeafSize >::to_string().
| TEST | ( | Rope | , |
| ConstructFromEmptyStringViewIsEmpty | |||
| ) |
Definition at line 253 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| ConstructFromStringView | |||
| ) |
Definition at line 245 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| CopyAndSmallConcatStayFastRegardlessOfSourceSize | |||
| ) |
Definition at line 699 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::copy(), Aleph::count(), and N.
| TEST | ( | Rope | , |
| CopyIsIndependentOfLaterOperationsOnTheOriginalVariable | |||
| ) |
Definition at line 482 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Rope< Char, LeafSize >::concat(), and Aleph::Rope< Char, LeafSize >::to_string().
| TEST | ( | Rope | , |
| DefaultConstructedRopeIsEmpty | |||
| ) |
Definition at line 230 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| EqualityComparesContentNotIdentity | |||
| ) |
Definition at line 431 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | Rope | , |
| EqualityHandlesMismatchedLeafBoundariesAndSharedSubtrees | |||
| ) |
Definition at line 445 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::concat().
| TEST | ( | Rope | , |
| EraseRemovesRange | |||
| ) |
Definition at line 361 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Rope< Char, LeafSize >::erase(), r, Aleph::Rope< Char, LeafSize >::to_string(), and Aleph::Rope< Char, LeafSize >::verify().
| TEST | ( | Rope | , |
| EraseThrowsOutOfRange | |||
| ) |
Definition at line 414 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| EraseWholeRopeGivesEmpty | |||
| ) |
Definition at line 371 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| EraseZeroLengthIsIdentity | |||
| ) |
Definition at line 377 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| FailedAllocationDuringConcatLeavesExistingRopesUnchanged | |||
| ) |
Definition at line 745 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | Rope | , |
| FlattenReturnsAllCharactersInOrder | |||
| ) |
Definition at line 421 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Rope< Char, LeafSize >::flatten(), and r.
| TEST | ( | Rope | , |
| IdentityEditsDoNotAllocate | |||
| ) |
Definition at line 383 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Rope< Char, LeafSize >::insert(), r, and Aleph::Rope< Char, LeafSize >::to_string().
| TEST | ( | Rope | , |
| InsertAtBoundariesWorks | |||
| ) |
Definition at line 346 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| InsertSplicesInAnotherRope | |||
| ) |
Definition at line 335 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Rope< Char, LeafSize >::insert(), r, Aleph::Rope< Char, LeafSize >::to_string(), and Aleph::Rope< Char, LeafSize >::verify().
| TEST | ( | Rope | , |
| InsertThrowsOutOfRange | |||
| ) |
Definition at line 355 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| RandomizedEditScriptMatchesStdString | |||
| ) |
Definition at line 574 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), random_string(), and rng.
| TEST | ( | Rope | , |
| RepeatedSelfConcatThrowsOverflowErrorInsteadOfWrappingOrHanging | |||
| ) |
Definition at line 866 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| RepeatedSingleCharacterConcatStaysCorrect | |||
| ) |
Definition at line 515 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| RepeatedSinglePrependStaysCorrect | |||
| ) |
Definition at line 537 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| RepeatedSmallConcatStaysFastEnoughToProveAbsorptionFired | |||
| ) |
Definition at line 645 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::count(), N, and r.
| TEST | ( | Rope | , |
| SubstrAtExactLeafBoundaries | |||
| ) |
Definition at line 559 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| SubstrExtractsCorrectRange | |||
| ) |
Definition at line 302 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| SubstrOfManyLeafRangeStaysCorrectAndFastRegardlessOfTotalSize | |||
| ) |
Definition at line 810 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), r, and rng.
| TEST | ( | Rope | , |
| SubstrOfWholeRopeSharesRoot | |||
| ) |
Definition at line 320 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| SubstrThrowsOutOfRange | |||
| ) |
Definition at line 312 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| TinyLeafSizeStillProducesCorrectResults | |||
| ) |
Definition at line 494 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and r.
| TEST | ( | Rope | , |
| VerifyHoldsForEmptyAndTrivialRopes | |||
| ) |
Definition at line 238 of file rope_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), verify(), and Aleph::Rope< Char, LeafSize >::verify().