77using MuConvert . parser ;
88using Rationals ;
99using Xunit . Abstractions ;
10- using static MuConvert . Tests . TestUtils ;
1110
1211namespace MuConvert . Tests ;
1312
@@ -21,25 +20,10 @@ public class MA2转Simai测试
2120
2221 public MA2转Simai测试 ( ITestOutputHelper output ) => _output = output ;
2322
24- public static IEnumerable < object [ ] > AllLevels ( string dataDir )
25- {
26- var repoRoot = FindRepoRoot ( ) ;
27- var testsetRoot = Path . Combine ( repoRoot . FullName , "tests" , "testset" , dataDir ) ;
28- if ( ! Directory . Exists ( testsetRoot ) )
29- throw new DirectoryNotFoundException ( $ "Testset root not found: { testsetRoot } ") ;
30-
31- foreach ( var maidataPath in Directory . EnumerateFiles ( testsetRoot , "maidata.txt" , SearchOption . AllDirectories ) )
32- {
33- var maidataTxt = File . ReadAllText ( maidataPath , Encoding . UTF8 ) ;
34- var maidata = new Maidata ( maidataTxt ) ;
35- foreach ( var id in maidata . Levels . Keys . OrderBy ( k => k ) )
36- // if (maidataPath.Contains("系ぎて") && id == 3)
37- yield return [ new TestInput ( maidataPath , id ) ] ;
38- }
39- }
40-
23+ public static IEnumerable < object [ ] > GetTestInputs ( string dataDir ) => TestUtils . GetTestInputs ( dataDir ) ;
24+
4125 [ Theory ]
42- [ MemberData ( nameof ( AllLevels ) , "官谱" ) ]
26+ [ MemberData ( nameof ( GetTestInputs ) , "官谱" ) ]
4327 public void 官谱转Simai测试 ( TestInput c ) => TestChart ( c ) ;
4428
4529 private void TestChart ( TestInput c )
0 commit comments