From cf782f4752ac32504eb04544cfcf471fbe8abc1c Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Fri, 24 Nov 2023 18:45:38 +0200 Subject: [PATCH] non-static? --- Jint.Tests/Runtime/EngineTests.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Jint.Tests/Runtime/EngineTests.cs b/Jint.Tests/Runtime/EngineTests.cs index 01059497c6..6edd4eec62 100644 --- a/Jint.Tests/Runtime/EngineTests.cs +++ b/Jint.Tests/Runtime/EngineTests.cs @@ -20,12 +20,11 @@ public partial class EngineTests : IDisposable private readonly Engine _engine; private int countBreak = 0; private StepMode stepMode; - private static readonly TimeZoneInfo _pacificTimeZone; - private static readonly TimeZoneInfo _tongaTimeZone; - private static readonly TimeZoneInfo _easternTimeZone; + private readonly TimeZoneInfo _pacificTimeZone; + private readonly TimeZoneInfo _tongaTimeZone; + private readonly TimeZoneInfo _easternTimeZone; - - static EngineTests() + public EngineTests(ITestOutputHelper output) { try { @@ -59,10 +58,7 @@ static EngineTests() // should be natively supported soon https://github.com/dotnet/runtime/issues/18644 _easternTimeZone = TimeZoneInfo.FindSystemTimeZoneById("America/New_York"); } - } - public EngineTests(ITestOutputHelper output) - { _engine = new Engine() .SetValue("log", new Action(o => output.WriteLine(o.ToString()))) .SetValue("assert", new Action(Assert.True))