コード例 #1
0
        public void AllFieldsUnknown()
        {
            var type  = (TypeDefinition)_fixture.MockModule.LookupMember(typeof(SimpleStruct).MetadataToken);
            var value = new HleStructValue(_environment.ValueFactory, type.ToTypeSignature(), false);

            Assert.False(value.IsKnown);
        }
コード例 #2
0
        public void OneFieldUnknown()
        {
            var type  = (TypeDefinition)_fixture.MockModule.LookupMember(typeof(SimpleStruct).MetadataToken);
            var field = type.Fields.First(f => f.Name == nameof(SimpleStruct.Y));
            var value = new HleStructValue(_environment.ValueFactory, type.ToTypeSignature(), true);

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