From 2b60cf910ae45ddc036d3e0ea5e2621b5f88f6e4 Mon Sep 17 00:00:00 2001 From: James Godfrey-Kittle Date: Fri, 11 Dec 2015 12:13:45 -0800 Subject: Add name, metadata tests for general and android There's no reason not to have these, and they're quite helpful for catching little issues. --- scripts/run_android_tests.py | 20 ++++++++++++++++++++ scripts/run_general_tests.py | 14 ++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/scripts/run_android_tests.py b/scripts/run_android_tests.py index 3751670..f6a1f46 100755 --- a/scripts/run_android_tests.py +++ b/scripts/run_android_tests.py @@ -19,12 +19,32 @@ import unittest from nototools.unittests import font_tests +import run_general_tests + FONTS = font_tests.load_fonts( ['out/android/*.ttf'], expected_count=18) +class TestMetaInfo(run_general_tests.TestMetaInfo): + """Bugs: + https://github.com/google/roboto/issues/142 + """ + + loaded_fonts = FONTS + mark_heavier_as_bold = True + + +class TestNames(run_general_tests.TestNames): + """Bugs: + https://github.com/google/roboto/issues/37 + """ + + loaded_fonts = FONTS + mark_heavier_as_bold = True + + class TestVerticalMetrics(font_tests.TestVerticalMetrics): loaded_fonts = FONTS test_glyphs_ymin_ymax = None diff --git a/scripts/run_general_tests.py b/scripts/run_general_tests.py index 3321fa3..78ba44c 100755 --- a/scripts/run_general_tests.py +++ b/scripts/run_general_tests.py @@ -61,6 +61,20 @@ class TestMetaInfo(font_tests.TestMetaInfo): expected_os2_achVendID = 'GOOG' +class TestNames(font_tests.TestNames): + """Bugs: + https://github.com/google/roboto/issues/37 + """ + + loaded_fonts = FONTS + family_name = 'Roboto' + mark_heavier_as_bold = False + expected_copyright = 'Font data copyright Google 2015' + + def expected_unique_id(self, family, style): + return 'Google:%s:2015' % family + + class TestDigitWidths(font_tests.TestDigitWidths): loaded_fonts = FONTS -- cgit v1.2.3