File tree Expand file tree Collapse file tree 1 file changed +28
-11
lines changed
Expand file tree Collapse file tree 1 file changed +28
-11
lines changed Original file line number Diff line number Diff line change 1+ use xmodits_lib:: module:: PcmType ;
2+ use xmodits_lib:: { load_from_bytes, load_from_path, AudioFormat , Ripper } ;
3+
14#[ ignore = "for manual testing only" ]
25#[ test]
36fn test_extraction ( ) {
4- xmodits_lib:: extract (
5- "tests/modules/xm/vagyakozas.xm" ,
6- "modules/vagyakozas_xm" ,
7- & xmodits_lib:: Ripper :: default ( ) ,
8- false ,
9- )
10- . unwrap ( ) ;
7+ Ripper :: default ( )
8+ . audio_format ( AudioFormat :: S3I )
9+ . extract_from_path (
10+ "tests/modules/xm/vagyakozas.xm" ,
11+ "modules/vagyakozas_xm" ,
12+ false ,
13+ )
14+ . unwrap ( ) ;
1115}
1216
1317#[ ignore = "for manual testing only" ]
1418#[ test]
1519fn test_info ( ) {
16- for smp in xmodits_lib:: load_from_path ( "tests/modules/xm/sb-joint.xm" )
17- . unwrap ( )
18- . samples ( )
19- {
20+ let path = "tests/modules/it/bacter_vs_saga_musix_-_outline_bees.it" ;
21+ for smp in load_from_path ( path) . unwrap ( ) . samples ( ) {
2022 dbg ! ( smp) ;
2123 }
2224}
25+
26+ #[ ignore = "for manual testing only" ]
27+ #[ test]
28+ fn test_info2 ( ) {
29+ let module = include_bytes ! ( "modules/it/test_it.mptm" ) ;
30+ let smp = load_from_bytes ( module, None ) . unwrap ( ) ;
31+ dbg ! ( smp
32+ . samples( )
33+ . iter( )
34+ . any( |smp| smp. pcm_type == PcmType :: IT214 ) ) ;
35+ dbg ! ( smp
36+ . samples( )
37+ . iter( )
38+ . any( |smp| smp. pcm_type == PcmType :: IT215 ) ) ;
39+ }
You can’t perform that action at this time.
0 commit comments