Thursday, 31 January 2013

WebVTT Cue Identifier and Timings Unit Test Reivew

I went over the cue identifier tests and general timings tests again to updated the file for the new repo.

I noticed some important mistakes about treating the second cue differently than the first and I've removed those tests. The first and second cue are treated the same, except if there is no blank line between the first cue's identifier and the WEBVTT string, then the identifier is treated as the file header and the cue is processed as if it had no header.

I also fixed some comments to reflect that the first and second cues are treated the same.

I ran the tests. Many of the tests crash (beyond the 4 I've changed)  since all the DISABLEDs have been removed. So I did not do anything to point out which one crashes.

The following are changed other than removing the unnecessary tests I added.

Cue Identifier Unit Tests

Identifier Line Ending Unit Tests (cilineendings_unittest.cpp)

  • LongStringLF
    • Shortend strings. Long identifier test is seperate. We shouldn't tests two things.
    • Renamed to "TwoLinesLF"
  • LongStringCRLF
    • Shortend strings. Long identifier test is seperate. We shouldn't tests two things.
    • Rename to "TwoLinesCRLF"

1 comment:

  1. What does "TwoLines" have to do with the cue identifier? The cue identifier is a line that doesn't contain "-->", and does not begin with NOTE.

    ReplyDelete