Files
Garry Newman d95169d8fa Unit Test Cleanup (#5064)
* Move all unit tests to Engine/Tests
* Fix Margin.EdgeSubtract
* Fix Capsule.Contains
* EnvironmentVariables.Remove if it's null
* Fixed ray trace never returning startedsolid
* Fix HistoryList.Navigate on empty list
* Fix GameObject.WorldPosition accepting NaNs
* Fix flex: initial expanding to the wrong grow/shrink
* Translation.TryConvert shouldn't throw on invalid enum strings
* Skip sound file tests on machines with no audio device
2026-06-12 13:23:50 +01:00

51 lines
870 B
C#

using Sandbox;
using System;
[AttributeUsage( AttributeTargets.Property )]
[CodeGenerator( CodeGeneratorFlags.WrapPropertySet | CodeGeneratorFlags.Instance, "OnWrapSet" )]
[CodeGenerator( CodeGeneratorFlags.WrapPropertySet | CodeGeneratorFlags.Static, "WrapSet.OnWrapSetStatic" )]
public class WrapSet : Attribute
{
public static void OnWrapSetStatic<T>( WrappedPropertySet<T> p )
{
}
}
public partial class TestWrapSet
{
[WrapSet]
public static bool StaticProperty { get; set; }
[WrapSet]
public bool InstanceProperty { set; }
internal void OnWrapSet<T>( WrappedPropertySet<T> p )
{
return null;
}
[WrapSet]
public bool HasNoSetterToWrap
{
get => true;
}
[WrapSet]
public bool FieldKeywordProperty
{
set
{
field = value;
}
get => field;
}
[WrapSet]
public bool FieldKeywordPropertyAuto
{
set;
get => field;
}
}