Files
sbox-public/engine/Tests/Sandbox.Test.Engine/data/StopwatchPanel.razor
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

30 lines
632 B
Plaintext

@namespace TestComponents
@using System.Diagnostics;
@for ( int i=0; i<10; i++)
{
<div style="hello">
@for ( int j=0; j< 10; j++)
{
@i <div style="hello" @onclick=@Stop>poop</div>
}</div>
}
<div class="bigtext" @onclick=@Stop>
<div class="title @(Seconds < 5 ? "is-fucked" : "is-relax")">The time is @Formatted</div>
<div class="icon"><i>time</i></div>
</div>
@code
{
public string Formatted => sw.Elapsed.ToString();
public float Seconds => (float)sw.Elapsed.TotalSeconds;
Stopwatch sw = Stopwatch.StartNew();
public void Stop()
{
sw.Stop();
}
}