示例#1
0
        public void ParseParameters_should_handle_empty_list()
        {
            var s = new SignatureParser("[]");

            s.MoveNext();
            Assert.Empty(s.ParseParameters(TokenType.RightBracket));
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }