Skip to content

Commit

Permalink
Added test cases for extension subtable...
Browse files Browse the repository at this point in the history
  • Loading branch information
mta452 committed Nov 13, 2016
1 parent 1b04b14 commit 0767606
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tools/Tester/GlyphManipulationTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,3 +614,15 @@ void TextProcessorTester::testChainContextSubtable()
{ 21, 22, 23, 1, 2, 3, 31, 32, 33 }, { 21, 22, 23, 10, 6, 20, 31, 32, 33 }, complexReferral);
}
}

void TextProcessorTester::testExtensionSubtable()
{
Builder builder;

/* Test with an unmatching glyph. */
testSubstitution(builder.createExtension(LookupType::sSingle, builder.createSingleSubst({ 1 }, 100)),
{ 0 }, { 0 });
/* Test with a matching glyph.*/
testSubstitution(builder.createExtension(LookupType::sSingle, builder.createSingleSubst({ 1 }, 100)),
{ 1 }, { 101 });
}
1 change: 1 addition & 0 deletions Tools/Tester/TextProcessorTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,5 @@ void TextProcessorTester::test()
testMarkToMarkPositioning();
testContextSubtable();
testChainContextSubtable();
testExtensionSubtable();
}
1 change: 1 addition & 0 deletions Tools/Tester/TextProcessorTester.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class TextProcessorTester {

void testContextSubtable();
void testChainContextSubtable();
void testExtensionSubtable();

void test();

Expand Down

0 comments on commit 0767606

Please sign in to comment.