mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-08-01 16:28:36 -04:00
* 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
16 lines
443 B
C#
16 lines
443 B
C#
namespace SceneTests;
|
|
|
|
/// <summary>
|
|
/// Base class for tests that create scenes. The gameobject hierarchy asserts main-thread
|
|
/// access and scene push scopes swap global time state, so these tests mark their thread
|
|
/// as the main thread and should be [DoNotParallelize] so that state isn't shared.
|
|
/// </summary>
|
|
public abstract class SceneTest
|
|
{
|
|
[TestInitialize]
|
|
public void MarkTestThreadAsMain()
|
|
{
|
|
ThreadSafe.MarkMainThread();
|
|
}
|
|
}
|