public void ProgramParsesReturnStatementWithUnsignedInteger() { string code = @" int main() { return 420u; } "; var program = new ProgramNode(); var function = new FunctionNode(program, "main", new List <FunctionParameter>()); var returnStatement = new ReturnNode(function); var returnValue = new UIntNode(returnStatement, 420u); returnStatement.AddChild(returnValue); function.AddChild(returnStatement); program.AddChild(function); AssertResultMatchesExpectedProgram(code, program); }
public static Node NewUInt(uint u) { UIntNode node = new UIntNode(u); return node; }