public void ParseTypeWithSpecifiers_type_parameters_given_name() { var s = new SignatureParser("Hello`1<W,X>"); s.MoveNext(); var t = s.ParseTypeWithSpecifiers(); Assert.Equal("Hello`2", t.Name); Assert.HasCount(2, t.GenericParameters); Assert.Equal("W", t.GenericParameters[0].Name); Assert.Equal("X", t.GenericParameters[1].Name); }
public void ParseTypeWithSpecifiers_type_args() { var s = new SignatureParser("Hello<W,X>"); s.MoveNext(); var t = s.ParseTypeWithSpecifiers(); Assert.Equal("Hello`2", t.Name); var gargs = ((GenericInstanceTypeName)t).GenericArguments; Assert.HasCount(2, gargs); Assert.Equal("W", gargs[0].Name); Assert.Equal("X", gargs[1].Name); }