diff --git a/third_party/txt/BUILD.gn b/third_party/txt/BUILD.gn index 48ce31730..b9f6227b4 100644 --- a/third_party/txt/BUILD.gn +++ b/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/third_party/txt/tests/old/unittest/CmapCoverageTest.cpp b/third_party/txt/tests/CmapCoverageTest.cpp similarity index 100% rename from third_party/txt/tests/old/unittest/CmapCoverageTest.cpp rename to third_party/txt/tests/CmapCoverageTest.cpp diff --git a/third_party/txt/tests/old/unittest/EmojiTest.cpp b/third_party/txt/tests/EmojiTest.cpp similarity index 100% rename from third_party/txt/tests/old/unittest/EmojiTest.cpp rename to third_party/txt/tests/EmojiTest.cpp diff --git a/third_party/txt/tests/old/util/FileUtils.cpp b/third_party/txt/tests/FileUtils.cpp similarity index 100% rename from third_party/txt/tests/old/util/FileUtils.cpp rename to third_party/txt/tests/FileUtils.cpp diff --git a/third_party/txt/tests/old/util/FileUtils.h b/third_party/txt/tests/FileUtils.h similarity index 100% rename from third_party/txt/tests/old/util/FileUtils.h rename to third_party/txt/tests/FileUtils.h diff --git a/third_party/txt/tests/old/unittest/FontCollectionItemizeTest.cpp b/third_party/txt/tests/FontCollectionItemizeTest.cpp similarity index 99% rename from third_party/txt/tests/old/unittest/FontCollectionItemizeTest.cpp rename to third_party/txt/tests/FontCollectionItemizeTest.cpp index 0c98df51d..9494d8f3d 100644 --- a/third_party/txt/tests/old/unittest/FontCollectionItemizeTest.cpp +++ b/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/third_party/txt/tests/old/unittest/FontCollectionTest.cpp b/third_party/txt/tests/FontCollectionTest.cpp similarity index 99% rename from third_party/txt/tests/old/unittest/FontCollectionTest.cpp rename to third_party/txt/tests/FontCollectionTest.cpp index fb2f11180..64b792127 100644 --- a/third_party/txt/tests/old/unittest/FontCollectionTest.cpp +++ b/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/third_party/txt/tests/old/unittest/FontFamilyTest.cpp b/third_party/txt/tests/FontFamilyTest.cpp similarity index 99% rename from third_party/txt/tests/old/unittest/FontFamilyTest.cpp rename to third_party/txt/tests/FontFamilyTest.cpp index 68d6d51b4..eb7cb1752 100644 --- a/third_party/txt/tests/old/unittest/FontFamilyTest.cpp +++ b/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/third_party/txt/tests/old/unittest/FontLanguageListCacheTest.cpp b/third_party/txt/tests/FontLanguageListCacheTest.cpp similarity index 96% rename from third_party/txt/tests/old/unittest/FontLanguageListCacheTest.cpp rename to third_party/txt/tests/FontLanguageListCacheTest.cpp index 5c20f0977..4a0dfada8 100644 --- a/third_party/txt/tests/old/unittest/FontLanguageListCacheTest.cpp +++ b/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/third_party/txt/tests/old/util/FontTestUtils.cpp b/third_party/txt/tests/FontTestUtils.cpp similarity index 98% rename from third_party/txt/tests/old/util/FontTestUtils.cpp rename to third_party/txt/tests/FontTestUtils.cpp index acb4fee50..00b78ebd1 100644 --- a/third_party/txt/tests/old/util/FontTestUtils.cpp +++ b/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/third_party/txt/tests/old/util/FontTestUtils.h b/third_party/txt/tests/FontTestUtils.h similarity index 100% rename from third_party/txt/tests/old/util/FontTestUtils.h rename to third_party/txt/tests/FontTestUtils.h diff --git a/third_party/txt/tests/old/unittest/GraphemeBreakTests.cpp b/third_party/txt/tests/GraphemeBreakTests.cpp similarity index 99% rename from third_party/txt/tests/old/unittest/GraphemeBreakTests.cpp rename to third_party/txt/tests/GraphemeBreakTests.cpp index 7350b5b0e..58b386555 100644 --- a/third_party/txt/tests/old/unittest/GraphemeBreakTests.cpp +++ b/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/third_party/txt/tests/old/unittest/HbFontCacheTest.cpp b/third_party/txt/tests/HbFontCacheTest.cpp similarity index 96% rename from third_party/txt/tests/old/unittest/HbFontCacheTest.cpp rename to third_party/txt/tests/HbFontCacheTest.cpp index 5edd016b4..fb886a8bd 100644 --- a/third_party/txt/tests/old/unittest/HbFontCacheTest.cpp +++ b/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/third_party/txt/tests/old/unittest/HyphenatorTest.cpp b/third_party/txt/tests/HyphenatorTest.cpp similarity index 99% rename from third_party/txt/tests/old/unittest/HyphenatorTest.cpp rename to third_party/txt/tests/HyphenatorTest.cpp index f7daf414e..886b38dc1 100644 --- a/third_party/txt/tests/old/unittest/HyphenatorTest.cpp +++ b/third_party/txt/tests/HyphenatorTest.cpp @@ -16,8 +16,8 @@ #include -#include #include +#include "FileUtils.h" #include "ICUTestBase.h" #ifndef NELEM diff --git a/third_party/txt/tests/old/unittest/ICUTestBase.h b/third_party/txt/tests/ICUTestBase.h similarity index 100% rename from third_party/txt/tests/old/unittest/ICUTestBase.h rename to third_party/txt/tests/ICUTestBase.h diff --git a/third_party/txt/tests/old/unittest/LayoutTest.cpp b/third_party/txt/tests/LayoutTest.cpp similarity index 100% rename from third_party/txt/tests/old/unittest/LayoutTest.cpp rename to third_party/txt/tests/LayoutTest.cpp diff --git a/third_party/txt/tests/old/unittest/LayoutUtilsTest.cpp b/third_party/txt/tests/LayoutUtilsTest.cpp similarity index 99% rename from third_party/txt/tests/old/unittest/LayoutUtilsTest.cpp rename to third_party/txt/tests/LayoutUtilsTest.cpp index b10610b9f..1c57e4b90 100644 --- a/third_party/txt/tests/old/unittest/LayoutUtilsTest.cpp +++ b/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/third_party/txt/tests/old/unittest/MeasurementTests.cpp b/third_party/txt/tests/MeasurementTests.cpp similarity index 98% rename from third_party/txt/tests/old/unittest/MeasurementTests.cpp rename to third_party/txt/tests/MeasurementTests.cpp index d6daf42fa..ea3b7007e 100644 --- a/third_party/txt/tests/old/unittest/MeasurementTests.cpp +++ b/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/third_party/txt/tests/old/util/MinikinFontForTest.cpp b/third_party/txt/tests/MinikinFontForTest.cpp similarity index 100% rename from third_party/txt/tests/old/util/MinikinFontForTest.cpp rename to third_party/txt/tests/MinikinFontForTest.cpp diff --git a/third_party/txt/tests/old/util/MinikinFontForTest.h b/third_party/txt/tests/MinikinFontForTest.h similarity index 100% rename from third_party/txt/tests/old/util/MinikinFontForTest.h rename to third_party/txt/tests/MinikinFontForTest.h diff --git a/third_party/txt/tests/old/unittest/SparseBitSetTest.cpp b/third_party/txt/tests/SparseBitSetTest.cpp similarity index 100% rename from third_party/txt/tests/old/unittest/SparseBitSetTest.cpp rename to third_party/txt/tests/SparseBitSetTest.cpp diff --git a/third_party/txt/tests/old/util/UnicodeUtils.cpp b/third_party/txt/tests/UnicodeUtils.cpp similarity index 100% rename from third_party/txt/tests/old/util/UnicodeUtils.cpp rename to third_party/txt/tests/UnicodeUtils.cpp diff --git a/third_party/txt/tests/old/util/UnicodeUtils.h b/third_party/txt/tests/UnicodeUtils.h similarity index 98% rename from third_party/txt/tests/old/util/UnicodeUtils.h rename to third_party/txt/tests/UnicodeUtils.h index 564ffccdd..24f7acc34 100644 --- a/third_party/txt/tests/old/util/UnicodeUtils.h +++ b/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/third_party/txt/tests/old/unittest/UnicodeUtilsTest.cpp b/third_party/txt/tests/UnicodeUtilsTest.cpp similarity index 100% rename from third_party/txt/tests/old/unittest/UnicodeUtilsTest.cpp rename to third_party/txt/tests/UnicodeUtilsTest.cpp diff --git a/third_party/txt/tests/old/unittest/WordBreakerTests.cpp b/third_party/txt/tests/WordBreakerTests.cpp similarity index 100% rename from third_party/txt/tests/old/unittest/WordBreakerTests.cpp rename to third_party/txt/tests/WordBreakerTests.cpp