コード例 #1
0
        private TimeInvalid[] checkInvalidLyricTime(Lyric lyric)
        {
            var result = new List <TimeInvalid>();

            if (LyricUtils.CheckIsTimeOverlapping(lyric))
            {
                result.Add(TimeInvalid.Overlapping);
            }

            if (LyricUtils.CheckIsStartTimeInvalid(lyric))
            {
                result.Add(TimeInvalid.StartTimeInvalid);
            }

            if (LyricUtils.CheckIsEndTimeInvalid(lyric))
            {
                result.Add(TimeInvalid.EndTimeInvalid);
            }

            return(result.ToArray());
        }
コード例 #2
0
ファイル: LyricUtilsTest.cs プロジェクト: littlebees/karaoke
        public void TestCheckIsTimeOverlapping(string lyricText, bool actual)
        {
            var lyric = TestCaseTagHelper.ParseLyric(lyricText);

            Assert.AreEqual(LyricUtils.CheckIsTimeOverlapping(lyric), actual);
        }