Ejemplo n.º 1
0
        public void Can_cast_to_string()
        {
            var proxy = GetProxy <ClassWithStringField>();

            ClrType type = proxy.GetClrType();

            var address = type.GetFieldByName("Value").GetAddress((ulong)proxy);

            ulong stringAddress;

            _heap.ReadPointer(address, out stringAddress);

            Assert.AreEqual("OK", (string)_heap.GetProxy(stringAddress));
        }