Saturday, 15 December 2012

WebVTT Cue Identifier Unit Test Reivew

Updated: Removed second cue tests. It is the same as the first.

I changed all the comments.

The default value for the identifier is an empty string.

A number of tests had to be duplicated and changed to test the first and second cue because the parsing rules are different after the first cue.

All test have a new assert to make sure the identifier was set (or not set) correctly. However since I can find no way of comparing with a webvtt string all the string asserts are disabled by comments.

It is vital that some way be found to compare strings for tests. I spent about 8 hours trying to find a way via every possible method I could think of including extensive modification of the cue and string C++ wrappers, testing for number of cues, testing for exceptions, and others.

I appears that the parser cannot handle more than one cue. Also, a number of these tests are failing for very basic reasons such as there being 0 cues when there should be 1.

Crashing Test

  • CueIdGeneral.LongString2
  • CueIdGeneral.IdOnly2
  • CueIdGeneral.IdOnly2TrailingNewline

Failing Tests

  • CueIdArrow.Arrow
  • CueIdArrow.ExtraArrowhead
  • CueIdArrow.ExtraMinusSign
  • CueIdArrow.LongStringWithArrow
  • CueIdGeneral.BasicPass2
  • CueIdGeneral.IdOnly
  • CueIdLineEndings.TwoBetweenIdAndTimestamp
  • CueIdLineEndings.MissingBetweenPayloadAndId
  • CueIdLineEndings.LongStringLF
  • CueIdLineEndings.LongStringCRLF

No comments:

Post a comment