Thursday, 31 January 2013

WebVTT Cue Timings Unit Test Review

I should note this file had almost 3000 lines.

I've changed all the comments to reflect the parser rules since that is what the tests need to match. I've added comments for any syntax error. The comments should be separate since they are from different parts of the specifications and regarding different things.

Cue Timings Unit Test Review (cuetimes_unittest.cpp)

  • FromOneDigitMinute
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert.
  • FromThreeDigitMinute
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert.
  • FromOneDigitSecond
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert.
  • FromThreeDigitSecond
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • FromTwoDigitMillisecond
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • FromFourDigitMillisecond
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • FromMinuteGreaterThan59
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • FromSecondGreaterThan59
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • FromMillisecondGreaterThan999
    • Technically this is the same test as "FromFourDigitMillisecond", but I left it in.
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • FromBadDelimiterMinuteSecond
    • To for the deliminator between minute and second, the hour must not be 2 digits, otherwise it checked for the deliminator between second and millisecond.
      • Changed hour from 00 to 000 in "bad-delimiter-minute-second.vtt".
  • FromBadDelimiterHourMinute
    • Keep consistant with "FromBadDelimiterMinuteSecond" test.
      • Changed hour from 00 to 000 in "bad-delimiter-hour-minute.vtt".
  • FromBadDelimiterSecondMillisecond
    • Keep consistant with "FromBadDelimiterMinuteSecond" test.
      • Changed hour from 00 to 000 in "bad-delimiter-second-millisecond.vtt".
  • UntilMinuteWithinLowBoundary
    • Minutes in timestamp not consistent with similar tests. It was the same as in "UntilMinuteWithinHighBoundary".
      • Changed "minute-within-low-boundary.vtt"
      • Changed test to match vtt file.
  • UntilMinuteWithinHighBoundary
    • Minutes in timestamp not consistent with similar tests. It was the same as in "UntilMinuteWithinLowBoundary".
      • Changed "minute-within-high-boundary.vtt".
      • Changed test to match vtt file.
  • UntilSecondWithinLowBoundary
    • Seconds in timestamp not consistent with similar tests. It was the same as in "UntilSecondWithinHighBoundary".
      • Changed "second-within-low-boundary.vtt"
      • Changed test to match vtt file.
  • UntilSecondWithinHighBoundary
    • Seconds in timestamp not consistent with similar tests. It was the same as in "UntilSecondWithinLowBoundary".
      • Changed "second-within-high-boundary.vtt".
      • Changed test to match vtt file.
  • UntilMillisecondWithinLowBoundary
    • Milliseconds in timestamp not consistent with similar tests. It was the same as in "UntilMillisecondWithinHighBoundary".
      • Changed "millisecond-within-low-boundary.vtt"
      • Changed test to match vtt file.
  • UntilMillisecondWithinHighBoundary
    • Milliseconds in timestamp not consistent with similar tests. It was the same as in "UntilMillisecondWithinLowBoundary".
      • Changed "millisecond-within-high-boundary.vtt".
      • Changed test to match vtt file.
  • UntilOneDigitMinute
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert.
  • UntilThreeDigitMinute
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert.
  • UntilOneDigitSecond
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert.
  • UntilThreeDigitSecond
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • UntilTwoDigitMillisecond
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • UntilFourDigitMillisecond
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • UntilMinuteGreaterThan59
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • UntilSecondGreaterThan59
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • UntilMillisecondGreaterThan999
    • Technically this is the same test as "FromFourDigitMillisecond", but I left it in.
    • The cue will be bad and discarded.
      • Changed cues returned from 1 to 0.
      • Removed timestamp assert
  • UntilBadDelimiterMinuteSecond
    • To for the deliminator between minute and second, the hour must not be 2 digits, otherwise it checked for the deliminator between second and millisecond.
      • Changed hour from 00 to 000 in "bad-delimiter-minute-second.vtt".
  • UntilBadDelimiterHourMinute
    • Keep consistant with "UntilBadDelimiterMinuteSecond" test.
      • Changed hour from 00 to 000 in "bad-delimiter-hour-minute.vtt".
  • UntilBadDelimiterSecondMillisecond
    • Keep consistant with "UntilBadDelimiterMinuteSecond" test.
      • Changed hour from 00 to 000 in "bad-delimiter-second-millisecond.vtt".
  • BareMinimum
    • Added timestamps asserts since the goal of these tests is to test timestamps.
  • BareMinimumWithContent
    • Added timestamps asserts since the goal of these tests is to test timestamps.
  • HighestValues
    • Added timestamps asserts since the goal of these tests is to test timestamps.
  • SpaceTabs
    • Duplicate test. Removed. See separator tests.
  • Tabs
    • Duplicate test. Removed. See separator tests.
  • Hours
    • Added timestamps asserts since the goal of these tests is to test timestamps.
  • MultiCues
    • Added timestamps asserts since the goal of these tests is to test timestamps.
  • NestedCues
    • Added timestamps asserts since the goal of these tests is to test timestamps.
  • MissingSpaces
    • Duplicate test. Removed. See separator tests.
  • MissingSpaceLeft
    • Duplicate test. Removed. See separator tests.
  • MissingSpaceRight
    • Duplicate test. Removed. See separator tests.
  • NoNumsInTimeStamp
    • Duplicate test. Removed. See from and until in timings tests (this file).
  • ArrowsWrongDirection
    • Duplicate test. Removed. See separator tests.
  • BadTimeStamps1
    • Duplicate test. Removed. See deliminator in from and until in timings tests (this file).
  • BadTimeStamps2
    • Duplicate test. Removed. See deliminator in from and until in timings tests (this file).
  • TimeStampHoursOmitted renamed to StartTimeStampHoursOmitted.
  • EndTimeStampHoursOmitted  added.

No comments:

Post a Comment