diff --git a/engine/src/flutter/third_party/txt/BUILD.gn b/engine/src/flutter/third_party/txt/BUILD.gn index 48ce317308..b9f6227b41 100644 --- a/engine/src/flutter/third_party/txt/BUILD.gn +++ b/engine/src/flutter/third_party/txt/BUILD.gn @@ -115,6 +115,21 @@ executable("txt_unittests") { testonly = true sources = [ + "tests/CmapCoverageTest.cpp", + "tests/EmojiTest.cpp", + "tests/FileUtils.cpp", + "tests/FileUtils.h", + "tests/FontTestUtils.h", + "tests/GraphemeBreakTests.cpp", + "tests/ICUTestBase.h", + "tests/LayoutUtilsTest.cpp", + "tests/MeasurementTests.cpp", + "tests/MinikinFontForTest.cpp", + "tests/MinikinFontForTest.h", + "tests/SparseBitSetTest.cpp", + "tests/UnicodeUtils.cpp", + "tests/UnicodeUtils.h", + "tests/UnicodeUtilsTest.cpp", "tests/font_collection_unittests.cc", "tests/paragraph_unittests.cc", "tests/render_test.cc", @@ -122,6 +137,16 @@ executable("txt_unittests") { "tests/txt_run_all_unittests.cc", "tests/utils.cc", "tests/utils.h", + + # These tests require static fixtures. + # "tests/FontCollectionItemizeTest.cpp", + # "tests/FontCollectionTest.cpp", + # "tests/FontFamilyTest.cpp", + # "tests/FontLanguageListCacheTest.cpp", + # "tests/FontTestUtils.cpp", + # "tests/HbFontCacheTest.cpp", + # "tests/HyphenatorTest.cpp", + # "tests/LayoutTest.cpp", ] deps = [ diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/CmapCoverageTest.cpp b/engine/src/flutter/third_party/txt/tests/CmapCoverageTest.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/unittest/CmapCoverageTest.cpp rename to engine/src/flutter/third_party/txt/tests/CmapCoverageTest.cpp diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/EmojiTest.cpp b/engine/src/flutter/third_party/txt/tests/EmojiTest.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/unittest/EmojiTest.cpp rename to engine/src/flutter/third_party/txt/tests/EmojiTest.cpp diff --git a/engine/src/flutter/third_party/txt/tests/old/util/FileUtils.cpp b/engine/src/flutter/third_party/txt/tests/FileUtils.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/util/FileUtils.cpp rename to engine/src/flutter/third_party/txt/tests/FileUtils.cpp diff --git a/engine/src/flutter/third_party/txt/tests/old/util/FileUtils.h b/engine/src/flutter/third_party/txt/tests/FileUtils.h similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/util/FileUtils.h rename to engine/src/flutter/third_party/txt/tests/FileUtils.h diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/FontCollectionItemizeTest.cpp b/engine/src/flutter/third_party/txt/tests/FontCollectionItemizeTest.cpp similarity index 99% rename from engine/src/flutter/third_party/txt/tests/old/unittest/FontCollectionItemizeTest.cpp rename to engine/src/flutter/third_party/txt/tests/FontCollectionItemizeTest.cpp index 0c98df51da..9494d8f3d0 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/FontCollectionItemizeTest.cpp +++ b/engine/src/flutter/third_party/txt/tests/FontCollectionItemizeTest.cpp @@ -22,10 +22,10 @@ #include "ICUTestBase.h" #include "MinikinFontForTest.h" #include "UnicodeUtils.h" -#include "lib/txt/libs/minikin/FontLanguage.h" -#include "lib/txt/libs/minikin/FontLanguageListCache.h" -#include "lib/txt/libs/minikin/MinikinInternal.h" #include "minikin/FontFamily.h" +#include "minikin/FontLanguage.h" +#include "minikin/FontLanguageListCache.h" +#include "minikin/MinikinInternal.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/FontCollectionTest.cpp b/engine/src/flutter/third_party/txt/tests/FontCollectionTest.cpp similarity index 99% rename from engine/src/flutter/third_party/txt/tests/old/unittest/FontCollectionTest.cpp rename to engine/src/flutter/third_party/txt/tests/FontCollectionTest.cpp index fb2f11180a..64b7921277 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/FontCollectionTest.cpp +++ b/engine/src/flutter/third_party/txt/tests/FontCollectionTest.cpp @@ -19,7 +19,7 @@ #include #include "FontTestUtils.h" #include "MinikinFontForTest.h" -#include "lib/txt/libs/minikin/MinikinInternal.h" +#include "minikin/MinikinInternal.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/FontFamilyTest.cpp b/engine/src/flutter/third_party/txt/tests/FontFamilyTest.cpp similarity index 99% rename from engine/src/flutter/third_party/txt/tests/old/unittest/FontFamilyTest.cpp rename to engine/src/flutter/third_party/txt/tests/FontFamilyTest.cpp index 68d6d51b41..eb7cb1752a 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/FontFamilyTest.cpp +++ b/engine/src/flutter/third_party/txt/tests/FontFamilyTest.cpp @@ -21,8 +21,8 @@ #include "ICUTestBase.h" #include "MinikinFontForTest.h" -#include "lib/txt/libs/minikin/FontLanguageListCache.h" -#include "lib/txt/libs/minikin/MinikinInternal.h" +#include "minikin/FontLanguageListCache.h" +#include "minikin/MinikinInternal.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/FontLanguageListCacheTest.cpp b/engine/src/flutter/third_party/txt/tests/FontLanguageListCacheTest.cpp similarity index 96% rename from engine/src/flutter/third_party/txt/tests/old/unittest/FontLanguageListCacheTest.cpp rename to engine/src/flutter/third_party/txt/tests/FontLanguageListCacheTest.cpp index 5c20f0977f..4a0dfada8f 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/FontLanguageListCacheTest.cpp +++ b/engine/src/flutter/third_party/txt/tests/FontLanguageListCacheTest.cpp @@ -19,8 +19,8 @@ #include #include "ICUTestBase.h" -#include "lib/txt/libs/minikin/FontLanguageListCache.h" -#include "lib/txt/libs/minikin/MinikinInternal.h" +#include "minikin/FontLanguageListCache.h" +#include "minikin/MinikinInternal.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/util/FontTestUtils.cpp b/engine/src/flutter/third_party/txt/tests/FontTestUtils.cpp similarity index 98% rename from engine/src/flutter/third_party/txt/tests/old/util/FontTestUtils.cpp rename to engine/src/flutter/third_party/txt/tests/FontTestUtils.cpp index acb4fee503..00b78ebd14 100644 --- a/engine/src/flutter/third_party/txt/tests/old/util/FontTestUtils.cpp +++ b/engine/src/flutter/third_party/txt/tests/FontTestUtils.cpp @@ -24,7 +24,7 @@ #include #include #include "MinikinFontForTest.h" -#include "lib/txt/libs/minikin/FontLanguage.h" +#include "minikin/FontLanguage.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/util/FontTestUtils.h b/engine/src/flutter/third_party/txt/tests/FontTestUtils.h similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/util/FontTestUtils.h rename to engine/src/flutter/third_party/txt/tests/FontTestUtils.h diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/GraphemeBreakTests.cpp b/engine/src/flutter/third_party/txt/tests/GraphemeBreakTests.cpp similarity index 99% rename from engine/src/flutter/third_party/txt/tests/old/unittest/GraphemeBreakTests.cpp rename to engine/src/flutter/third_party/txt/tests/GraphemeBreakTests.cpp index 7350b5b0ef..58b386555c 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/GraphemeBreakTests.cpp +++ b/engine/src/flutter/third_party/txt/tests/GraphemeBreakTests.cpp @@ -14,9 +14,9 @@ * limitations under the License. */ -#include #include #include +#include "UnicodeUtils.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/HbFontCacheTest.cpp b/engine/src/flutter/third_party/txt/tests/HbFontCacheTest.cpp similarity index 96% rename from engine/src/flutter/third_party/txt/tests/old/unittest/HbFontCacheTest.cpp rename to engine/src/flutter/third_party/txt/tests/HbFontCacheTest.cpp index 5edd016b45..fb886a8bd1 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/HbFontCacheTest.cpp +++ b/engine/src/flutter/third_party/txt/tests/HbFontCacheTest.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "lib/txt/libs/minikin/HbFontCache.h" +#include "minikin/HbFontCache.h" #include #include @@ -26,7 +26,7 @@ #include #include "MinikinFontForTest.h" -#include "lib/txt/libs/minikin/MinikinInternal.h" +#include "minikin/MinikinInternal.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/HyphenatorTest.cpp b/engine/src/flutter/third_party/txt/tests/HyphenatorTest.cpp similarity index 99% rename from engine/src/flutter/third_party/txt/tests/old/unittest/HyphenatorTest.cpp rename to engine/src/flutter/third_party/txt/tests/HyphenatorTest.cpp index f7daf414e3..886b38dc12 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/HyphenatorTest.cpp +++ b/engine/src/flutter/third_party/txt/tests/HyphenatorTest.cpp @@ -16,8 +16,8 @@ #include -#include #include +#include "FileUtils.h" #include "ICUTestBase.h" #ifndef NELEM diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/ICUTestBase.h b/engine/src/flutter/third_party/txt/tests/ICUTestBase.h similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/unittest/ICUTestBase.h rename to engine/src/flutter/third_party/txt/tests/ICUTestBase.h diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/LayoutTest.cpp b/engine/src/flutter/third_party/txt/tests/LayoutTest.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/unittest/LayoutTest.cpp rename to engine/src/flutter/third_party/txt/tests/LayoutTest.cpp diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/LayoutUtilsTest.cpp b/engine/src/flutter/third_party/txt/tests/LayoutUtilsTest.cpp similarity index 99% rename from engine/src/flutter/third_party/txt/tests/old/unittest/LayoutUtilsTest.cpp rename to engine/src/flutter/third_party/txt/tests/LayoutUtilsTest.cpp index b10610b9fa..1c57e4b903 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/LayoutUtilsTest.cpp +++ b/engine/src/flutter/third_party/txt/tests/LayoutUtilsTest.cpp @@ -14,10 +14,10 @@ * limitations under the License. */ -#include #include +#include "UnicodeUtils.h" -#include "lib/txt/libs/minikin/LayoutUtils.h" +#include "minikin/LayoutUtils.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/MeasurementTests.cpp b/engine/src/flutter/third_party/txt/tests/MeasurementTests.cpp similarity index 98% rename from engine/src/flutter/third_party/txt/tests/old/unittest/MeasurementTests.cpp rename to engine/src/flutter/third_party/txt/tests/MeasurementTests.cpp index d6daf42fa4..ea3b7007e3 100644 --- a/engine/src/flutter/third_party/txt/tests/old/unittest/MeasurementTests.cpp +++ b/engine/src/flutter/third_party/txt/tests/MeasurementTests.cpp @@ -14,9 +14,9 @@ * limitations under the License. */ -#include #include #include +#include "UnicodeUtils.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/tests/old/util/MinikinFontForTest.cpp b/engine/src/flutter/third_party/txt/tests/MinikinFontForTest.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/util/MinikinFontForTest.cpp rename to engine/src/flutter/third_party/txt/tests/MinikinFontForTest.cpp diff --git a/engine/src/flutter/third_party/txt/tests/old/util/MinikinFontForTest.h b/engine/src/flutter/third_party/txt/tests/MinikinFontForTest.h similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/util/MinikinFontForTest.h rename to engine/src/flutter/third_party/txt/tests/MinikinFontForTest.h diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/SparseBitSetTest.cpp b/engine/src/flutter/third_party/txt/tests/SparseBitSetTest.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/unittest/SparseBitSetTest.cpp rename to engine/src/flutter/third_party/txt/tests/SparseBitSetTest.cpp diff --git a/engine/src/flutter/third_party/txt/tests/old/util/UnicodeUtils.cpp b/engine/src/flutter/third_party/txt/tests/UnicodeUtils.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/util/UnicodeUtils.cpp rename to engine/src/flutter/third_party/txt/tests/UnicodeUtils.cpp diff --git a/engine/src/flutter/third_party/txt/tests/old/util/UnicodeUtils.h b/engine/src/flutter/third_party/txt/tests/UnicodeUtils.h similarity index 98% rename from engine/src/flutter/third_party/txt/tests/old/util/UnicodeUtils.h rename to engine/src/flutter/third_party/txt/tests/UnicodeUtils.h index 564ffccdde..24f7acc343 100644 --- a/engine/src/flutter/third_party/txt/tests/old/util/UnicodeUtils.h +++ b/engine/src/flutter/third_party/txt/tests/UnicodeUtils.h @@ -14,6 +14,8 @@ * limitations under the License. */ +#include + namespace minikin { void ParseUnicode(uint16_t* buf, diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/UnicodeUtilsTest.cpp b/engine/src/flutter/third_party/txt/tests/UnicodeUtilsTest.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/unittest/UnicodeUtilsTest.cpp rename to engine/src/flutter/third_party/txt/tests/UnicodeUtilsTest.cpp diff --git a/engine/src/flutter/third_party/txt/tests/old/unittest/WordBreakerTests.cpp b/engine/src/flutter/third_party/txt/tests/WordBreakerTests.cpp similarity index 100% rename from engine/src/flutter/third_party/txt/tests/old/unittest/WordBreakerTests.cpp rename to engine/src/flutter/third_party/txt/tests/WordBreakerTests.cpp