Thursday, 31 January 2013

WebVTT File Structure Unit Tests Review

As usual I've changed the comments to reflect the specification for the parser. Fortunately a few of the comments were correct and I didn't have to change them.

File Structure Unit Tests Review (filestructure_unittest.cpp)

  • BlankFile
    • Added false to the load function. The parser fails if the first line has less that 6 characters.
    • Since it should fail there should be an error. I've added "WEBVTT_MALFORMED_TAG" error check.
  • BlankFileWithBOM
    • Added false to the load function. The parser fails if the first line has less that 6 characters.
    • Since it should fail there should be an error. I've added "WEBVTT_MALFORMED_TAG" error check.
  • HeaderNoNewLine
    • Nothing wrong. First comment ever that I didn't have to change.
  • MultiCueNoNewlineBetweenCues
    • There should be two cues. Changed load function cue count check to 2.
  • BOMGarbageData
    • This throws an error. Added "WEBVTT_MALFORMED_TAG" error check.
  • BOMTabWebvtt
    • Tab before WEBVTT string throws an error. Added "WEBVTT_MALFORMED_TAG" error check.
  • MissingNewLineBetweenCues
    • Duplicate of "MultiCueNoNewlineBetweenCues" test.
    • Removed test.

No comments:

Post a Comment