mirror of
https://github.com/ppy/osu
synced 2024-12-09 08:30:36 +00:00
Add test coverage for localisable setting source
This commit is contained in:
parent
45e9eda9e7
commit
784ce4d23d
@ -7,6 +7,7 @@ using NUnit.Framework;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Overlays.Settings;
|
||||
using osuTK;
|
||||
@ -39,6 +40,9 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
[SettingSource("Sample bool", "Clicking this changes a setting")]
|
||||
public BindableBool TickBindable { get; } = new BindableBool();
|
||||
|
||||
[SettingSource(typeof(TestStrings), nameof(TestStrings.LocalisableLabel), nameof(TestStrings.LocalisableDescription))]
|
||||
public BindableBool LocalisableBindable { get; } = new BindableBool(true);
|
||||
|
||||
[SettingSource("Sample float", "Change something for a mod")]
|
||||
public BindableFloat SliderBindable { get; } = new BindableFloat
|
||||
{
|
||||
@ -75,5 +79,11 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
Value1,
|
||||
Value2
|
||||
}
|
||||
|
||||
private class TestStrings
|
||||
{
|
||||
public static LocalisableString LocalisableLabel => new LocalisableString("Sample localisable label");
|
||||
public static LocalisableString LocalisableDescription => new LocalisableString("Sample localisable description");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user