-
-
Save humphd/4132693 to your computer and use it in GitHub Desktop.
Test Fixture Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public CueTest : public testing::Test | |
{ | |
protected: | |
virtual void LoadVTT( char *fileName, uint expectedNumberOfCues ) | |
{ | |
parser = ItemStorageParser( fileName ); | |
//todo (did it work) | |
ASSERT_TRUE( parser.parse() ); << "parser.parse() failed" | |
ASSERT_EQ( expectedNumberOfCues, parser.cueCount() ) << "webvtt file contained different number of cues than expected, once parsed." | |
} | |
virtual const Cue& GetCue( uint index ) | |
{ | |
return parser.getCue( index ); | |
} | |
ItemStorageParser parser; | |
} | |
TEST_F( CueTest, RL) | |
{ | |
LoadVTT( "cue-settings/vertical/rl.vtt", 1 ); | |
ASSERT_TRUE( GetCue( 0 ).isVerticalRightToLeft() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment