anchor.diff:        expect(stack.removeLast(), name, reason: 'Non-matching start element.');
       },
       onCharacterData: (text) {
  +      expect(state, 1, reason: 'Reader not started');
         expect(nodes, isNotEmpty, reason: 'Missing element in node list.');
         XmlNode node = nodes.removeAt(0);
         expect(node.nodeType, anyOf(XmlNodeType.TEXT, XmlNodeType.CDATA),
  
positive.code:       expect(text, node.text, reason: 'Text data should match.');
      },
      onProcessingInstruction: (target, text) {
        expect(nodes, isNotEmpty, reason: 'Missing element in node list.');
        XmlNode node = nodes.removeAt(0);
        expect(node.nodeType, XmlNodeType.PROCESSING,
  
negative.code:     onFatalError: (index, _) => fail('Fatal error at $index.'),
    );
    reader.parse(input);
    expect(nodes, isEmpty, reason: 'All nodes should be processed.');
    expect(stack, isEmpty, reason: 'All elements should be closed.');
    expect(state, 2, reason: 'Reader not completed.');
  }
  