Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case for reverse time-tags. #162

Merged
merged 1 commit into from
Apr 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ public TestSceneKaraokeSpriteText()
};
}

[TestCase(new[] { "[0,start]:500", "[1,start]:600", "[2,start]:1000", "[3,start]:1500", "[4,start]:2000" }, true)] // Normal time-tag.
[TestCase(new[] { "[0,start]:0", "[0,end]:100", "[1,start]:1000", "[1,end]:1100", "[2,start]:2000", "[2,end]:2100", "[3,start]:3000", "[3,end]:3100", "[4,start]:4000", "[4,end]:4100" }, true)]
[TestCase(new[] { "[-1,start]:0", "[0,start]:500", "[1,end]:600", "[2,start]:1000", "[3,end]:1500", "[4,end]:2000", "[8,end]:2500" }, true)] // Out-of-range time-tag, but it's acceptable now.
[TestCase(new[] { "[0,start]:500" }, true)] // Only one time-tag.
public void TestKaraokeSpriteTextTimeTags(string[] timeTags, bool boo)
[TestCase("Normal", new[] { "[0,start]:500", "[1,start]:600", "[2,start]:1000", "[3,start]:1500", "[4,start]:2000" })] // Normal time-tag.
[TestCase("Normal 2", new[] { "[0,start]:0", "[0,end]:100", "[1,start]:1000", "[1,end]:1100", "[2,start]:2000", "[2,end]:2100", "[3,start]:3000", "[3,end]:3100", "[4,start]:4000", "[4,end]:4100" })]
[TestCase("Out of range", new[] { "[-1,start]:0", "[0,start]:500", "[1,end]:600", "[2,start]:1000", "[3,end]:1500", "[4,end]:2000", "[8,end]:2500" })] // Out-of-range time-tag, but it's acceptable now.
[TestCase("Reverse", new[] { "[4,start]:2000", "[3,start]:1500", "[2,start]:1000", "[1,start]:600", "[0,start]:500" })] // Reverse order.
[TestCase("Reverse index", new[] { "[0,start]:2000", "[1,start]:1500", "[2,start]:1000", "[3,start]:600", "[4,start]:500" })] // Normal time-tag with reverse time(will have reverse effect).
[TestCase("Reverse time", new[] { "[4,start]:500", "[3,start]:600", "[2,start]:1000", "[1,start]:1500", "[0,start]:2000" })] // Reverse time-tag with non-reverse time(will have reverse effect).
[TestCase("One", new[] { "[0,start]:500" })] // Only one time-tag.
public void TestKaraokeSpriteTextTimeTags(string name, string[] timeTags)
{
AddStep("Apply time-tags", () =>
AddStep($"Apply \"{name}\" time-tags", () =>
{
var startTime = Clock.CurrentTime;

Expand Down