-
Notifications
You must be signed in to change notification settings - Fork 0
/
tester.nim
executable file
·43 lines (31 loc) · 1.15 KB
/
tester.nim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import ../src/osureplay, unittest, times
suite "Standart osu! game mode replays parsing":
let cookiezi = parseReplayFile("tests/resources/cookiezi817.osr")
test "Game mode":
check(cookiezi.gameMode == gmStandard)
test "Game version":
check(cookiezi.gameVersion == 20151228)
test "Beatmap hash":
check(cookiezi.beatmapHash == "d7e1002824cb188bf318326aa109469d")
test "Player name":
check(cookiezi.playerName == "Cookiezi")
test "Number of hits (300s, 100s, 50s, etc)":
check(cookiezi.number300s == 1165)
check(cookiezi.number100s == 8)
check(cookiezi.number50s == 0)
check(cookiezi.gekis == 254)
check(cookiezi.katus == 7)
check(cookiezi.misses == 0)
test "Score":
check(cookiezi.score == 72389038)
test "Max combo":
check(cookiezi.maxCombo == 1773)
test "Is it a perfect combo":
check(cookiezi.isPerfectCombo == false)
test "Mod combinations":
check(cookiezi.mods == {Mod.Hidden, Mod.DoubleTime})
test "Timestamp":
check($cookiezi.timestamp == "2016-01-02T23:52:27Z")
test "Play data":
check(cookiezi.playEvents[0] is ReplayEvent)
check(len(cookiezi.playEvents) == 16159)