public void ParseParameters_should_handle_empty_list() { var s = new SignatureParser("[]"); s.MoveNext(); Assert.Empty(s.ParseParameters(TokenType.RightBracket)); }
public void ParseParameters_should_handle_whitespace(string text) { var s = new SignatureParser(text); s.MoveNext(); var data = s.ParseParameters(TokenType.RightBracket).ToList(); Assert.Equal(5, data.Count); }
public void ParseParameters_should_handle_pointer_parameter(string text) { var s = new SignatureParser(text); s.MoveNext(); var data = s.ParseParameters(TokenType.RightBracket).ToList(); Assert.Equal(1, data.Count); Assert.Equal("Int64*", data[0].Type.Name); Assert.True(data[0].Type.IsPointer); Assert.Equal(TokenType.RightBracket, s.Type); }