diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneTest.cs b/osu.Framework.Tests/Visual/Testing/TestSceneTest.cs index 5c37636140..c93a996bc7 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneTest.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneTest.cs @@ -104,6 +104,17 @@ public void TestTest() [Repeat(2)] public void TestTestCase(int _) => TestTest(); + [TestCase(0)] + [TestCase(1, "one")] + [TestCase(3, "one", "two", "three")] + [TestCase(2, new[] { "test", "two" })] + public void TestParamsTestCase(int length, params string[] p) + { + TestTest(); + AddAssert("params is array", () => p, Is.TypeOf); + AddAssert("length is expected", () => p, () => Has.Length.EqualTo(length)); + } + protected override ITestSceneTestRunner CreateRunner() => new TestRunner(); private partial class TestRunner : TestSceneTestRunner diff --git a/osu.Framework/Testing/TestBrowser.cs b/osu.Framework/Testing/TestBrowser.cs index ee68420c1c..4ed7863d36 100644 --- a/osu.Framework/Testing/TestBrowser.cs +++ b/osu.Framework/Testing/TestBrowser.cs @@ -468,7 +468,7 @@ private void finishLoad(TestScene newTest, Action onCompletion) hadTestAttributeTest = true; CurrentTest.AddLabel($"{name}({string.Join(", ", tc.Arguments)}){repeatSuffix}"); - handleTestMethod(m, tc.Arguments); + handleTestMethod(m, tc.BuildFrom(methodWrapper, null).Single().Arguments); } foreach (var tcs in m.GetCustomAttributes(typeof(TestCaseSourceAttribute), false).OfType())