Skip to content

Commit

Permalink
Unit test for #137
Browse files Browse the repository at this point in the history
  • Loading branch information
Tillerino committed Jan 16, 2018
1 parent fa26e98 commit cd97163
Show file tree
Hide file tree
Showing 2 changed files with 277 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.Collections;

import org.junit.Test;
import org.tillerino.osuApiModel.OsuApiBeatmap;

public class KoohiiTest {
@Test
Expand All @@ -20,4 +21,20 @@ public void testSimple() throws Exception {
assertEquals(404, diff.getMaxCombo());
}
}

@Test
public void testIssue137() throws Exception {
try (InputStream is = ClassLoader.getSystemResourceAsStream(
"Ayase Rie - Yuima-ruWorld TVver. (Fycho) [Extra].osu")) {
DifficultyProperties diff = new Koohii().calculate(is, Collections.emptyList());
OsuApiBeatmap beatmap = new OsuApiBeatmap();
beatmap.setOverallDifficulty(8.7);
beatmap.setApproachRate(9);
beatmap.setMaxCombo(239);
CBeatmapImpl impl = new CBeatmapImpl(beatmap, diff.getSpeed(), diff.getAim(), diff.getCircleCount(),
diff.getAllObjectsCount(), true, false, true);
CStandardScore score = new CStandardScore(239, 165, 13, 0, 0, 0);
assertEquals(138.287, score.getPP(impl), 0d);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
osu file format v14

[General]
AudioFilename: audio.MP3
AudioLeadIn: 0
PreviewTime: 21975
Countdown: 0
SampleSet: Soft
StackLeniency: 0.7
Mode: 0
LetterboxInBreaks: 0
WidescreenStoryboard: 1

[Editor]
DistanceSpacing: 1.3
BeatDivisor: 4
GridSize: 4
TimelineZoom: 1.8

[Metadata]
Title:Yuima-ru*World TVver.
TitleUnicode:ゆいまーる☆わーるど TVver.
Artist:Ayase Rie
ArtistUnicode:綾瀬 理恵
Creator:Fycho
Version:Extra
Source:はいたい七葉
Tags:haitai nanafa yuimaru
BeatmapID:983680
BeatmapSetID:459149

[Difficulty]
HPDrainRate:7
CircleSize:4
OverallDifficulty:8.7
ApproachRate:9
SliderMultiplier:1.76
SliderTickRate:1

[Events]
//Background and Video events
0,0,"haitainanafa.jpg",0,0
//Break Periods
//Storyboard Layer 0 (Background)
//Storyboard Layer 1 (Fail)
//Storyboard Layer 2 (Pass)
//Storyboard Layer 3 (Foreground)
//Storyboard Sound Samples

[TimingPoints]
726,333.333333333333,4,2,1,50,1,0
726,-133.333333333333,4,2,1,50,0,0
5892,-100,4,2,1,60,0,0
11059,-76.9230769230769,4,2,1,60,0,0
11392,-133.333333333333,4,2,1,50,0,0
16725,-100,4,2,1,60,0,0
18059,-100,4,2,1,70,0,0
19392,-100,4,2,1,75,0,0
21725,-76.9230769230769,4,2,1,60,0,0
22059,-100,4,2,1,80,0,1
22725,-90.9090909090909,4,2,1,80,0,1
23392,-100,4,2,1,80,0,1
25392,-90.9090909090909,4,2,1,80,0,1
26059,-100,4,2,1,80,0,1
27059,-100,4,2,1,70,0,1
27392,-100,4,2,1,80,0,1
33392,-83.3333333333333,4,2,1,80,0,1
34059,-100,4,2,1,80,0,1
36059,-83.3333333333333,4,2,1,80,0,1
36725,-100,4,2,1,80,0,1
37725,-100,4,2,1,70,0,1
38059,-100,4,2,1,80,0,1
41892,-100,4,2,1,70,0,0


[Colours]
Combo1 : 226,29,98
Combo2 : 47,155,136
Combo3 : 255,151,226
Combo4 : 33,233,208

[HitObjects]
67,205,726,5,8,0:0:0:0:
168,265,892,1,8,0:0:0:0:
153,176,1059,1,0,0:0:0:0:
84,298,1225,1,0,0:0:0:0:
236,341,1392,2,0,P|266:279|250:216,1,132.000005035401,0|2,0:0|0:0,0:0:0:0:
212,108,1892,6,0,L|301:106,1,66.0000025177003,8|2,0:0|0:0,0:0:0:0:
353,32,2225,2,0,L|434:19,1,66.0000025177003,8|2,0:0|0:0,0:0:0:0:
482,93,2559,1,0,0:0:0:0:
404,255,2725,2,0,P|369:178|395:133,1,132.000005035401,2|8,0:0|0:0,0:0:0:0:
208,286,3392,6,0,L|206:214,1,66.0000025177003,8|8,0:0|0:0,0:0:0:0:
298,183,3725,2,0,L|296:252,1,66.0000025177003,0|2,0:0|0:0,0:0:0:0:
272,361,4059,2,0,L|353:346,2,66.0000025177003,0|2|0,0:0|0:0|0:0,0:0:0:0:
136,382,4559,6,0,P|136:328|145:299,1,66.0000025177003,8|0,0:0|0:0,0:0:0:0:
124,165,4892,1,8,0:0:0:0:
203,241,5059,2,0,P|235:246|268:242,1,66.0000025177003,8|0,0:0|0:0,0:0:0:0:
470,223,5392,5,8,0:0:0:0:
338,324,5559,1,8,0:0:0:0:
428,131,5725,1,4,0:0:0:0:
428,131,6059,5,4,0:0:0:0:
278,99,6225,1,0,0:0:0:0:
344,168,6392,2,0,L|257:206,1,88,8|0,0:0|0:0,0:0:0:0:
307,10,6725,5,2,0:0:0:0:
368,71,6892,1,2,0:0:0:0:
188,120,7059,2,0,L|203:29,1,88,8|2,0:0|0:0,0:0:0:0:
161,213,7392,6,0,P|119:225|79:210,1,88,0|2,0:0|0:0,0:0:0:0:
285,67,7725,2,0,P|327:55|368:71,1,88,8|2,0:0|0:0,0:0:0:0:
296,252,8059,5,2,0:0:0:0:
417,144,8225,1,2,0:0:0:0:
399,255,8392,1,8,0:0:0:0:
322,153,8559,1,0,0:0:0:0:
256,344,8725,6,0,P|203:347|170:327,1,88,4|0,0:0|0:0,0:0:0:0:
64,180,9059,1,8,0:0:0:0:
141,245,9225,1,0,0:0:0:0:
31,361,9392,6,0,L|54:275,1,88,2|2,0:0|0:0,0:0:0:0:
151,138,9725,1,8,0:0:0:0:
64,180,9892,1,2,0:0:0:0:
231,196,10059,6,2,P|264:105|220:47,1,176,2|8,0:0|0:0,0:0:0:0:
231,196,10559,1,2,0:0:0:0:
355,71,10725,5,2,0:0:0:0:
422,141,10892,1,2,0:0:0:0:
416,247,11059,6,0,P|375:300|257:287,1,171.599992144776,12|0,0:0|0:0,0:0:0:0:
253,290,11392,6,0,L|167:286,1,66.0000025177003,12|2,0:0|0:0,0:0:0:0:
177,192,11725,2,0,L|266:198,1,66.0000025177003,0|10,0:0|0:0,0:0:0:0:
99,365,12059,2,0,P|81:318|104:239,1,132.000005035401,10|8,0:0|0:0,0:0:0:0:
346,131,12725,6,0,L|358:200,2,66.0000025177003,8|2|0,0:0|0:0|0:0,0:0:0:0:
302,12,13225,1,10,0:0:0:0:
243,189,13392,1,10,0:0:0:0:
302,12,13559,1,2,0:0:0:0:
212,100,13725,2,0,L|200:13,1,66.0000025177003,8|0,0:0|0:0,0:0:0:0:
243,189,14059,5,8,0:0:0:0:
301,251,14225,1,2,0:0:0:0:
358,186,14392,1,0,0:0:0:0:
299,123,14559,1,10,0:0:0:0:
199,263,14725,2,0,P|123:280|75:244,1,132.000005035401,10|8,0:0|0:0,0:0:0:0:
97,85,15392,6,0,L|177:76,1,66.0000025177003,10|0,0:0|0:0,0:0:0:0:
268,115,15725,1,0,0:0:0:0:
152,189,15892,1,10,0:0:0:0:
229,29,16059,1,8,0:0:0:0:
277,131,16225,1,8,0:0:0:0:
152,189,16392,1,8,0:0:0:0:
152,189,16475,1,8,0:0:0:0:
152,189,16559,1,8,0:0:0:0:
152,189,16642,1,8,0:0:0:0:
152,189,16725,6,0,P|135:235|128:377,1,176,4|8,0:0|0:0,0:0:0:0:
231,234,17225,1,0,0:0:0:0:
273,380,17392,5,2,0:0:0:0:
343,258,17559,1,0,0:0:0:0:
422,368,17725,6,0,L|435:280,1,88,8|0,0:0|0:0,0:0:0:0:
469,85,18059,5,2,0:0:0:0:
407,202,18225,1,0,0:0:0:0:
382,56,18392,5,8,0:0:0:0:
309,202,18559,1,0,0:0:0:0:
291,25,18725,5,2,0:0:0:0:
205,201,18892,1,0,0:0:0:0:
195,0,19059,5,8,0:0:0:0:
55,295,19392,5,8,0:0:0:0:
403,169,19559,1,2,0:0:0:0:
89,214,19725,5,8,0:0:0:0:
430,258,19892,1,2,0:0:0:0:
69,220,20059,5,8,0:0:0:0:
416,156,20225,1,2,0:0:0:0:
99,135,20392,5,8,0:0:0:0:
442,247,20559,1,4,0:0:0:0:
442,247,20892,5,8,0:0:0:0:
163,214,21059,1,8,0:0:0:0:
416,156,21225,1,0,0:0:0:0:
72,240,21392,1,8,0:0:0:0:
72,240,21725,6,0,P|79:158|160:126,1,171.599992144776,12|0,0:0|0:0,0:0:0:0:
162,113,22059,6,0,L|152:13,1,88,4|0,0:0|0:0,0:0:0:0:
332,153,22392,2,0,L|346:56,1,88,8|0,0:0|0:0,0:0:0:0:
153,294,22725,6,0,L|138:176,1,96.8000029541017,2|0,0:0|0:0,0:0:0:0:
339,332,23058,2,0,L|362:218,1,96.8000029541017,8|0,0:0|0:0,0:0:0:0:
430,119,23392,5,2,0:0:0:0:
343,151,23559,1,0,0:0:0:0:
354,62,23725,1,8,0:0:0:0:
420,206,23892,5,2,0:0:0:0:
270,98,24059,1,0,0:0:0:0:
442,22,24225,1,2,0:0:0:0:
420,206,24392,2,0,L|517:196,1,88,8|0,0:0|0:0,0:0:0:0:
270,98,24725,6,0,L|166:92,1,88,4|0,0:0|0:0,0:0:0:0:
103,286,25059,2,0,L|202:273,1,88,8|0,0:0|0:0,0:0:0:0:
241,75,25392,6,0,L|133:67,1,96.8000029541017,2|0,0:0|0:0,0:0:0:0:
79,313,25725,2,0,L|181:302,1,96.8000029541017,8|0,0:0|0:0,0:0:0:0:
440,268,26059,5,2,0:0:0:0:
352,160,26225,1,0,0:0:0:0:
308,294,26392,1,8,0:0:0:0:
442,176,26559,2,0,P|435:109|331:74,1,176,2|8,0:0|0:0,0:0:0:0:
259,143,27059,1,8,0:0:0:0:
224,161,27142,1,10,0:0:0:0:
185,167,27225,1,10,0:0:0:0:
148,151,27309,1,10,0:0:0:0:
125,118,27392,6,0,P|106:173|97:221,1,88,4|0,0:0|0:0,0:0:0:0:
136,301,27725,1,8,0:0:0:0:
292,335,27892,2,0,P|323:246|268:199,1,176,4|0,0:0|0:0,0:0:0:0:
323,105,28392,2,0,L|424:60,1,88,8|2,0:0|0:0,0:0:0:0:
457,294,28725,5,4,0:0:0:0:
349,210,28892,1,0,0:0:0:0:
455,163,29059,1,8,0:0:0:0:
353,329,29225,2,0,P|304:348|205:271,1,176,4|0,0:0|0:0,0:0:0:0:
249,110,29725,1,8,0:0:0:0:
315,197,29892,1,2,0:0:0:0:
135,200,30059,6,0,L|19:179,1,88,4|0,0:0|0:0,0:0:0:0:
347,98,30392,2,0,L|437:79,1,88,8|0,0:0|0:0,0:0:0:0:
277,41,30725,5,2,0:0:0:0:
315,197,30892,1,8,0:0:0:0:
214,112,31059,1,2,0:0:0:0:
286,308,31225,2,0,P|343:308|420:205,1,176,12|0,0:0|0:0,0:0:0:0:
200,25,31725,5,4,0:0:0:0:
487,93,31892,1,0,0:0:0:0:
179,122,32059,5,2,0:0:0:0:
492,175,32225,1,0,0:0:0:0:
164,214,32392,5,4,0:0:0:0:
495,258,32559,1,0,0:0:0:0:
277,289,32725,6,0,L|251:389,1,88,4|0,0:0|0:0,0:0:0:0:
452,244,33059,2,0,L|474:158,1,88,8|0,0:0|0:0,0:0:0:0:
250,283,33392,6,0,L|222:385,1,105.599996777344,4|0,0:0|0:0,0:0:0:0:
476,246,33725,2,0,L|504:144,1,105.599996777344,8|0,0:0|0:0,0:0:0:0:
365,15,34059,5,2,0:0:0:0:
379,174,34225,1,0,0:0:0:0:
227,110,34392,1,8,0:0:0:0:
428,90,34559,5,2,0:0:0:0:
276,29,34725,1,0,0:0:0:0:
294,189,34892,1,2,0:0:0:0:
139,122,35059,2,0,L|125:208,1,88,8|0,0:0|0:0,0:0:0:0:
96,369,35392,6,0,L|197:342,1,88,4|0,0:0|0:0,0:0:0:0:
377,166,35725,2,0,L|292:189,1,88,8|0,0:0|0:0,0:0:0:0:
360,291,36059,6,0,L|463:262,1,105.599996777344,4|0,0:0|0:0,0:0:0:0:
183,239,36392,2,0,L|66:270,1,105.599996777344,8|0,0:0|0:0,0:0:0:0:
219,35,36725,5,2,0:0:0:0:
262,153,36892,1,0,0:0:0:0:
143,129,37059,1,8,0:0:0:0:
310,62,37225,2,0,P|356:104|328:228,1,176,2|2,0:0|0:0,0:0:0:0:
183,239,37725,6,0,L|128:220,1,44,8|8,0:0|0:0,0:0:0:0:
246,160,37892,2,0,L|314:148,1,44,8|8,0:0|0:0,0:0:0:0:
426,123,38059,5,4,0:0:0:0:
454,290,38225,1,0,0:0:0:0:
347,184,38392,1,8,0:0:0:0:
282,311,38559,2,0,P|205:319|144:249,1,176,4|0,0:0|0:0,0:0:0:0:
185,79,39059,2,0,L|282:95,1,88,8|0,0:0|0:0,0:0:0:0:
77,153,39392,5,4,0:0:0:0:
95,67,39559,1,0,0:0:0:0:
183,169,39725,1,8,0:0:0:0:
97,310,39892,2,0,P|37:259|69:162,1,176,4|0,0:0|0:0,0:0:0:0:
274,170,40392,1,8,0:0:0:0:
178,84,40559,1,2,0:0:0:0:
168,286,40725,5,4,0:0:0:0:
256,25,40892,1,0,0:0:0:0:
272,353,41059,5,8,0:0:0:0:
178,84,41225,1,0,0:0:0:0:
165,326,41392,5,4,0:0:0:0:
273,119,41559,1,0,0:0:0:0:
57,294,41725,5,8,0:0:0:0:
420,219,41892,1,4,0:0:0:0:
420,219,42225,5,8,0:0:0:0:
290,196,42392,1,8,0:0:0:0:
290,196,42475,1,8,0:0:0:0:
290,196,42559,1,8,0:0:0:0:
511,115,42725,1,4,0:0:0:0:

0 comments on commit cd97163

Please sign in to comment.