public void ParsesCorrectly() { classUnderTest.ParseDoStatement().ShouldGenerateXml(@" <doStatement> <keyword>do</keyword> <identifier kind='field' isDefinition='false' number='0' classType='MyClass'>myClass</identifier> <symbol>.</symbol> <identifier kind='subroutine' isDefinition='false'>something</identifier> <symbol>(</symbol> <expressionList> <expression> <term> <integerConstant>5</integerConstant> </term> <symbol>+</symbol> <term> <integerConstant>3</integerConstant> </term> </expression> <symbol>,</symbol> <expression> <term> <identifier kind='argument' isDefinition='false' number='0'>blah</identifier> </term> </expression> </expressionList> <symbol>)</symbol> <symbol>;</symbol> </doStatement> "); }
public void ParsesCorrectly() { classUnderTest.ParseDoStatement().ShouldGenerateXml(@" <doStatement> <keyword>do</keyword> <identifier>myClass</identifier> <symbol>.</symbol> <identifier>something</identifier> <symbol>(</symbol> <expressionList> <expression> <term> <integerConstant>5</integerConstant> </term> <symbol>+</symbol> <term> <integerConstant>3</integerConstant> </term> </expression> <symbol>,</symbol> <expression> <term> <identifier>blah</identifier> </term> </expression> </expressionList> <symbol>)</symbol> <symbol>;</symbol> </doStatement> "); }
public void ParsesCorrectly() { classUnderTest.ParseDoStatement().ShouldGenerateXml(@" <doStatement> <keyword>do</keyword> <identifier kind='subroutine' isDefinition='false'>something</identifier> <symbol>(</symbol> <expressionList> <expression> <term> <identifier kind='var' isDefinition='false' number='0'>x</identifier> </term> </expression> </expressionList> <symbol>)</symbol> <symbol>;</symbol> </doStatement> "); }
public void ParsesCorrectly() { classUnderTest.ParseDoStatement().ShouldGenerateXml(@" <doStatement> <keyword>do</keyword> <identifier>something</identifier> <symbol>(</symbol> <expressionList> <expression> <term> <identifier>x</identifier> </term> </expression> </expressionList> <symbol>)</symbol> <symbol>;</symbol> </doStatement> "); }