test: ensure correct attributes

This commit is contained in:
MaxOhn
2023-11-02 11:59:46 +01:00
parent e653fd1c8d
commit ed397e038b
2 changed files with 9 additions and 3 deletions
+5 -2
View File
@@ -794,7 +794,9 @@ mod test {
let path = "./maps/2785319.osu";
let map = Beatmap::from_path(path).unwrap();
let attrs = OsuDifficultyAttributes {
let attrs = OsuStars::new(&map).calculate();
let expected = OsuDifficultyAttributes {
aim: 2.8693628443424104,
speed: 2.533869745015772,
flashlight: 2.288770487900865,
@@ -806,10 +808,11 @@ mod test {
n_circles: 307,
n_sliders: 293,
n_spinners: 1,
stars: 5.669858729379631,
stars: 5.669858729379628,
max_combo: 909,
};
assert_eq!(attrs, expected);
assert_eq!(
N_OBJECTS,
attrs.n_circles + attrs.n_sliders + attrs.n_spinners
+4 -1
View File
@@ -528,7 +528,9 @@ mod test {
let path = "./maps/1028484.osu";
let map = Beatmap::from_path(path).unwrap();
let attrs = TaikoDifficultyAttributes {
let attrs = TaikoStars::new(&map).calculate();
let expected = TaikoDifficultyAttributes {
stamina: 1.4528845068865617,
rhythm: 0.20130047251681948,
colour: 1.0487315549761433,
@@ -538,6 +540,7 @@ mod test {
max_combo: 289,
};
assert_eq!(attrs, expected);
assert_eq!(MAX_COMBO, attrs.max_combo);
(map, attrs)