A game framework written with osu! in mind.
at master 31 lines 1.1 kB view raw
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. 2// See the LICENCE file in the repository root for full licence text. 3 4using NUnit.Framework; 5using osu.Framework.Allocation; 6using osu.Framework.Bindables; 7using osu.Framework.Configuration; 8using osu.Framework.Platform; 9 10namespace osu.Framework.Tests.Visual.Platform 11{ 12 [Ignore("This test does not cover correct GL context acquire/release when run headless.")] 13 public class TestSceneExecutionModes : FrameworkTestScene 14 { 15 private Bindable<ExecutionMode> executionMode; 16 17 [BackgroundDependencyLoader] 18 private void load(FrameworkConfigManager configManager) 19 { 20 executionMode = configManager.GetBindable<ExecutionMode>(FrameworkSetting.ExecutionMode); 21 } 22 23 [Test] 24 public void ToggleModeSmokeTest() 25 { 26 AddRepeatStep("toggle execution mode", () => executionMode.Value = executionMode.Value == ExecutionMode.MultiThreaded 27 ? ExecutionMode.SingleThread 28 : ExecutionMode.MultiThreaded, 2); 29 } 30 } 31}