fixed async tests
This commit is contained in:
+5
-5
@@ -8,22 +8,22 @@ pub use self::mode::{Catch, Mania, Mode, Osu, Taiko};
|
||||
#[rustfmt::skip]
|
||||
macro_rules! test_map {
|
||||
($mode:ident) => {{
|
||||
#[cfg(not(any(feature = "async_tokio", feature = "async_str")))]
|
||||
#[cfg(not(any(feature = "async_tokio", feature = "async_std")))]
|
||||
{ common::test_map::<$mode>() }
|
||||
#[cfg(any(feature = "async_tokio", feature = "async_str"))]
|
||||
#[cfg(any(feature = "async_tokio", feature = "async_std"))]
|
||||
{ common::test_map::<$mode>().await }
|
||||
}};
|
||||
}
|
||||
|
||||
#[cfg(not(any(feature = "async_tokio", feature = "async_str")))]
|
||||
#[cfg(not(any(feature = "async_tokio", feature = "async_std")))]
|
||||
pub fn test_map<M: Mode>() -> Beatmap {
|
||||
let path = format!("./maps/{}.osu", M::TEST_MAP_ID);
|
||||
|
||||
Beatmap::from_path(path).unwrap()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "async_tokio", feature = "async_str"))]
|
||||
pub async fn test_map() -> Beatmap {
|
||||
#[cfg(any(feature = "async_tokio", feature = "async_std"))]
|
||||
pub async fn test_map<M: Mode>() -> Beatmap {
|
||||
let path = format!("./maps/{}.osu", M::TEST_MAP_ID);
|
||||
|
||||
Beatmap::from_path(path).await.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user