Пример #1
0
        public void Opaque2()
        {
            NativeNamedType named = new NativeNamedType("foo");
            NativePointer   ptr   = new NativePointer(named);
            NativeTypeDef   td    = new NativeTypeDef("FOOBAR", ptr);
            NativeSymbolBag bag   = new NativeSymbolBag();

            bag.AddTypeDef(td);
            Assert.Equal(1, bag.FindUnresolvedNativeSymbolRelationships().Count);
            Assert.False(bag.TryResolveSymbolsAndValues());
        }
Пример #2
0
        public void Opaque1()
        {
            NativeNamedType named = new NativeNamedType("struct", "foo");
            NativePointer   ptr   = new NativePointer(named);
            NativeTypeDef   td    = new NativeTypeDef("FOOBAR", ptr);
            NativeSymbolBag bag   = new NativeSymbolBag();

            bag.AddTypeDef(td);
            Assert.Equal(1, bag.FindUnresolvedNativeSymbolRelationships().Count);
            Assert.True(bag.TryResolveSymbolsAndValues());
            Assert.NotNull(named.RealType);
            Assert.Equal(NativeSymbolKind.OpaqueType, named.RealType.Kind);
        }