Skip to content

Instantly share code, notes, and snippets.

@humphd
Forked from RickEyre/TFExample
Created November 22, 2012 19:52
Show Gist options
  • Save humphd/4132693 to your computer and use it in GitHub Desktop.
Save humphd/4132693 to your computer and use it in GitHub Desktop.
Test Fixture Example
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