Пример #1
0
        public static void StructType(INamedTypeSymbol symbol)
        {
            var nfo = StructInfo.FromSymbol(symbol);

            Test.Assert(nfo.TypeInfo.AsStruct() != null, "Type should be convertable to struct.");
            Test.Assert(nfo.TypeInfo.Kind == CodeGeneration.CSharp.TypeInfo.TypeKind.Struct, "Type kind should be 'Struct'");
            Test.Assert(nfo.DataTypeInfo != null, "DataTypeInfo must not be null.");
            Test.Assert(nfo.DataTypeInfo.TypeInfo.Name == "StructType", "Struct name was wrongly detected.");
        }