mozilla/webvtt — pull request #307 by caitp (2013-03-28 17:51:03+00:00)
Title: [test-error] PayloadEscapeCharacter incorrect node kind assertions

@RickEyre informed me on IRC that the head node should always have a kind `WebVTT::Node::Head` (value '7', same as `WEBVTT_HEAD_NODE`).

Tests are expecting different values for the head node. Here are several instances of this in the PayloadEscapeCharacter test set.

```bash
$ test/unit/plescapecharacter_unittest.exe | grep -B 5 "Expected: Node::"
[ FAILED ] PayloadEscapeCharacter.AmpersandOutsideTwoTags (0 ms)
[ RUN ] PayloadEscapeCharacter.AmpersandOnNewLineAfterTwoTagsWithClass
plescapecharacter_unittest.cpp:1045: Failure
Value of: italicTag.kind()
Actual: 7
Expected: Node::Italic
--
[ FAILED ] PayloadEscapeCharacter.AmpersandInsideOneTagWithClass (1 ms)
[ RUN ] PayloadEscapeCharacter.AmpersandInsideTagWithSubclasses
plescapecharacter_unittest.cpp:1103: Failure
Value of: boldTag.kind()
Actual: 7
Expected: Node::Bold
--
[ FAILED ] PayloadEscapeCharacter.AmpersandInsideTagWithSubclasses (0 ms)
[ RUN ] PayloadEscapeCharacter.AmpersandOnLineWithClassAndSubClass
plescapecharacter_unittest.cpp:1132: Failure
Value of: italicTag.kind()
Actual: 7
Expected: Node::Italic
--
[ FAILED ] PayloadEscapeCharacter.AmpersandOnLineWithClassAndSubClass (0 ms)
[ RUN ] PayloadEscapeCharacter.AmpersandOnNewlineWithClassAndSubclass
plescapecharacter_unittest.cpp:1166: Failure
Value of: italicTag.kind()
Actual: 7
Expected: Node::Italic
--
[ FAILED ] PayloadEscapeCharacter.AmpersandOnNewlineWithClassAndSubclass (1 ms)
[ RUN ] PayloadEscapeCharacter.AmpersandOnCurrlineWithClassAndSubclass
plescapecharacter_unittest.cpp:1198: Failure
Value of: italicTag.kind()
Actual: 7
Expected: Node::Italic
--
[ FAILED ] PayloadEscapeCharacter.AmpersandOnCurrlineWithClassAndSubclass (0 ms)
[ RUN ] PayloadEscapeCharacter.AmpersandOnCurrlineWithClass
plescapecharacter_unittest.cpp:1230: Failure
Value of: italicTag.kind()
Actual: 7
Expected: Node::Italic
```

So, Instances where this error occurs:
- **PayloadEscapeCharacter.AmpersandOnNewLineAfterTwoTagsWithClass**
- **PayloadEscapeCharacter.AmpersandInsideTagWithSubclasses**
- **PayloadEscapeCharacter.AmpersandOnLineWithClassAndSubClass**
- **PayloadEscapeCharacter.AmpersandOnNewlineWithClassAndSubclass**
- **PayloadEscapeCharacter.AmpersandOnCurrlineWithClassAndSubclass**
- **PayloadEscapeCharacter.AmpersandOnCurrlineWithClass**

Edit: After #306 addressed, the tests mentioned in #306 suffer from the same problems:
- **PayloadEscapeCharacter.AmpersandWithinMultipleTags**
- **PayloadEscapeCharacter.AmpersandOutsideTwoTags**
- **PayloadEscapeCharacter.AmpersandInsideOneTagWithClass**

Geeze some of these test names are really hard to understand, it might be good if they were a bit clearer.