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); }
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); }