// Unit Tests for Scintilla internal data structures #include #include #include #include #include #include #include #include "Platform.h" #include "Position.h" #include "SplitVector.h" #include "catch.hpp" using namespace Scintilla; // Test SplitVector. struct StringSetHolder { SplitVector sa; bool Check() { for (int i = 0; i < sa.Length(); i++) { if (sa[i].empty()) { return false; } } return true; } }; const int lengthTestArray = 4; static const int testArray[4] = {3, 4, 5, 6}; TEST_CASE("SplitVector") { SplitVector sv; SECTION("IsEmptyInitially") { REQUIRE(0 == sv.Length()); } SECTION("InsertOne") { sv.InsertValue(0, 10, 0); sv.Insert(5, 3); REQUIRE(11 == sv.Length()); for (int i=0; i=0; i--) { sv.InsertValue(i, 1, static_cast(i+5)); sv.Delete(i+1); } for (int i=0; i