Example #1
0
        public unsafe void AllFieldsUnknown()
        {
            var type     = (TypeDefinition)_fixture.MockModule.LookupMember(typeof(SimpleStruct).MetadataToken);
            var contents = new MemoryBlockValue(sizeof(SimpleStruct));

            var value = new LleStructValue(_environment.ValueFactory, type.ToTypeSignature(), contents);

            Assert.False(value.IsKnown);
        }
Example #2
0
        public unsafe void OneFieldUnknown()
        {
            var type     = (TypeDefinition)_fixture.MockModule.LookupMember(typeof(SimpleStruct).MetadataToken);
            var field    = type.Fields.First(f => f.Name == nameof(SimpleStruct.Y));
            var contents = new MemoryBlockValue(sizeof(SimpleStruct), true);

            var value = new LleStructValue(_environment.ValueFactory, type.ToTypeSignature(), contents);

            value.SetFieldValue(field, new Integer32Value(0, 0));
            Assert.False(value.IsKnown);
        }