예제 #1
0
        private void TestRoundTrip(NativeSymbol symbol)
        {
            var storage      = new BasicSymbolStorage();
            var name         = NativeNameUtil.GetName(symbol);
            var globalSymbol = new NativeGlobalSymbol(name, symbol);

            storage.Add(globalSymbol);
            TestRoundTrip(storage);
        }
예제 #2
0
        public void SimpleConversions()
        {
            Action <NativeSymbol, NativeNameKind> test = (s, kind) =>
            {
                NativeName name;
                Assert.True(NativeNameUtil.TryGetName(s, out name));
                Assert.Equal(new NativeName(s.Name, kind), name);
            };

            test(new NativeStruct("test"), NativeNameKind.Struct);
            test(new NativeUnion("other"), NativeNameKind.Union);
            test(new NativeEnum("e"), NativeNameKind.Enum);
        }
예제 #3
0
 public override IEnumerable <NativeName> GetInitialData() => Storage.NativeNames.Where(x => NativeNameUtil.IsAnyType(x.Kind));