1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:57:24 +08:00
Commit Graph

313 Commits

Author SHA1 Message Date
Dean Herbert
7f65f3a47f Remove all usage of BaseDifficulty (and access Difficulty instead) 2022-01-18 22:57:39 +09:00
Dean Herbert
bf4133021b Update migration test to use realm file as test 2022-01-12 17:49:11 +09:00
Dean Herbert
f2f1adb792 Update FilterMatchingTest and filter code to use ruleset's OnlineID 2022-01-12 17:00:17 +09:00
Dean Herbert
e6f6558ddf Update mock model usage to set GUIDs instead of ints 2022-01-12 16:39:36 +09:00
Dan Balasescu
af9fad00c3 Merge branch 'master' into async-deadlock-safety 2022-01-10 16:11:09 +09:00
Dean Herbert
02d8a6359a Update FilterMatchingTest and filter code to use ruleset's OnlineID
The tests were relying on the `RulesetID` being set to 0 in the example
beatmap, even though the ruleset *instance* was set to ID 5.

This explicitly adds that 0 value to show intent, and also removes the
incorrect specification of 5 (which would cause the convert filter tests
to fail).

Also updates the filter code to use `OnlineID`, which is required in
realm changes.
2022-01-10 12:30:34 +09:00
Dean Herbert
00177a3ae1 Update usages to new naming 2022-01-06 22:54:43 +09:00
Dean Herbert
73b40e6833 Replace usage of .Result with .WaitSafelyForResult 2022-01-04 11:51:41 +09:00
Dean Herbert
1c0dc204c4 Fix some regressing behaviour due to CleanRunHeadlessGameHost's naming structure changing 2021-12-24 20:24:37 +09:00
Dean Herbert
4b88e257e5 Update usages of CleanRunHeadlessGameHost to match new signature 2021-12-24 20:17:34 +09:00
Dan Balasescu
24c6f8fafa Fix multiplayer test failures when checking for parted room 2021-12-22 12:55:37 +09:00
Bartłomiej Dach
e35a8cab65
Merge branch 'master' into fix-custom-directory-tests 2021-12-21 13:08:27 +01:00
Dean Herbert
4a3a5054fd Ensure CustomDataDirectoryTest methods use a fresh directory to avoid IO errors
Resolves test failures like https://github.com/ppy/osu/runs/4592088736?check_suite_focus=true.
2021-12-21 18:42:39 +09:00
Bartłomiej Dach
b6a458a07e
Cover seasonal backgrounds not resetting on inactivity in test 2021-12-21 08:50:25 +01:00
Bartłomiej Dach
979624160f
Do not reset last hover sound playback time on inactivity 2021-12-21 08:47:41 +01:00
Dean Herbert
16fe0e4f89 Fix SessionStaticsTest never working
In headless operation, the test would complete before ever reaching an
idle state. And this test only ran headless..
2021-12-21 15:39:08 +09:00
Dean Herbert
981158ed88 Rename method and simplify SetDefault calling code 2021-12-21 15:34:32 +09:00
Dan Balasescu
6057037e35 Move playlist item beatmap population to MatchSubScreen 2021-12-10 20:08:59 +09:00
Dean Herbert
0adfb75cf3 Combine similarly named StatefulMultiplayerClient tests 2021-12-02 14:53:07 +09:00
Dan Balasescu
0479027f64 Apply assertion fix from review 2021-12-01 11:29:02 +09:00
Dan Balasescu
4a34a5c738 Refactor difficulty adjustment mod combinations test 2021-11-30 11:11:42 +09:00
Dean Herbert
183b95cbc2 Rename BeatmapSetOnlineStatus to BeatmapOnlineStatus
This variable is used at more than just a set level.
2021-11-24 18:42:49 +09:00
Dean Herbert
f283770f34 Update mock RulesetInfo usage to set OnlineID instead of ID 2021-11-24 15:50:26 +09:00
Dan Balasescu
69a9fc9732 Fix a few more multiplayer test timeouts
These can be tested by adding a `Task.Delay(3000);` at the end of the
`MultiplayerClient.JoinRoom` task. The reason is typically that
`Client.Room` becomes not-null but the join task still hasn't completed
yet, so e.g. the ready button is still disabled.
2021-11-23 16:07:03 +09:00
Dean Herbert
93fe57d399 Update tests to match new equality not including online ID checks 2021-11-15 14:43:43 +09:00
Dean Herbert
692e846acd Rename BeatmapSetInfo.OnlineBeatmapSetID to OnlineID to match interface 2021-11-12 17:52:44 +09:00
Dean Herbert
6a098a8634 Rename BeatmapInfo.OnlineBeatmapID to OnlineID to match interface 2021-11-12 17:46:24 +09:00
Bartłomiej Dach
69809390d3
Fix HUD unstable rate counter not including judgements before load complete
Also unifies UR calculation logic with the results screen statistic item
to reduce duplication.
2021-11-11 13:36:05 +01:00
Dean Herbert
51a353e12d Rename BeatmapInfo.Version to DifficultyName to match underlying interface 2021-11-11 17:20:53 +09:00
Dean Herbert
ebe58cee11 Rename BeatmapInfo.StarDifficulty to StarRating to match underlying interface 2021-11-11 17:19:46 +09:00
Bartłomiej Dach
6d30248cef
Merge branch 'master' into use-class-rename 2021-11-07 15:41:00 +01:00
Dean Herbert
0ecf5f201c Rename User to APIUser and move to correct namespace 2021-11-07 11:26:01 +09:00
Bartłomiej Dach
6a1c27d67a
Merge branch 'master' into fix-more-null 2021-11-06 15:36:15 +01:00
Salman Ahmed
b723975767 Replace pragma with add/remove => throw 2021-11-05 09:10:38 +03:00
Salman Ahmed
af6ae1cce5 Remove hacky code with explicit pragma disable 2021-11-05 03:49:35 +03:00
Dean Herbert
9c926e5514 Remove BeatmapSetInfo.OnlineInfo and all usages 2021-11-04 15:23:04 +09:00
Dean Herbert
d1e6d1cb98 Update some other missed incorrect null/empty usages 2021-11-04 14:50:43 +09:00
Dean Herbert
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
smoogipoo
bc37cb6f43 Merge branch 'master' into no-more-difficulty-control-points-info 2021-10-08 18:41:17 +09:00
Dean Herbert
ec61c3c5ee Rename all remaining cases 2021-10-03 00:55:29 +09:00
Dean Herbert
46bafb6252 Merge branch 'master' into no-more-difficulty-control-points-info 2021-09-28 13:53:56 +09:00
Dean Herbert
91a48084c7 Update asserts in line with framework changes to PlaybackPosition 2021-09-07 17:25:03 +09:00
Dean Herbert
1952ebece9 Update tests to use more correct control point definitions 2021-09-06 22:04:51 +09:00
Dean Herbert
a3d9ab1e2e Move approach rate to EffectControlPoint 2021-09-03 16:58:16 +09:00
Dean Herbert
071c56e90b Update usages of DifficultyPointAt 2021-09-03 16:58:16 +09:00
Dean Herbert
ccacf56dd8 Move to legacy namespace 2021-08-30 17:14:53 +09:00
Dean Herbert
7257aae7f2 Move samples to LegacyControlPointInfo 2021-08-30 17:14:53 +09:00
Dean Herbert
5e234fb746 Add try catch to avoid test failures on windows 2021-08-20 22:07:13 +09:00
Dean Herbert
dc44cc0eb3 Update scenarios to use new TestRunHeadlessGameHost where feasible 2021-08-18 16:01:56 +09:00
Dean Herbert
2b9168157d Fix CurrentMatchPlayingItem not being reset on leaving a multiplayer room 2021-08-10 16:53:03 +09:00
Dean Herbert
472c0137ec Add new extension for formatting time durations 2021-07-31 16:45:53 +09:00
Lucas A
e301a99607 Fix accuracy format unit tests. 2021-07-24 12:39:24 +02:00
Dean Herbert
e507faef29 Add deep cloning support to Score/ScoreInfo/Replay 2021-07-19 14:14:28 +09:00
Dean Herbert
3c028ce05c Add IDeepCloneable interface and update existing CreateCopy methods to use it 2021-07-19 12:54:17 +09:00
Dean Herbert
887035c12e Fix migration target having left over files potentially causing test failures
As seen at
https://github.com/ppy/osu/pull/13831/checks?check_run_id=3025050324.
2021-07-09 12:21:25 +09:00
Dean Herbert
cd2916f778 Fix remaining incorrect filename 2021-07-05 18:56:59 +09:00
Dean Herbert
7645da7d37 Fix incorrect filename 2021-07-05 18:20:04 +09:00
smoogipoo
cc877f88e2 Fix inspection (create a new ruleset every time) 2021-07-05 10:13:01 +09:00
Derrick Timmermans
1facdcf483
Apply changes to tests 2021-07-04 23:23:24 +02:00
Derrick Timmermans
6d2ffe3a94
Add basic tests 2021-07-04 22:51:35 +02:00
smoogipoo
92fa99700e Merge branch 'master' into rework-multiplayer-test-scenes 2021-06-29 15:39:59 +09:00
Gagah Pangeran Rosfatiputra
4df4afe533
add test for overall difficulty filter query 2021-06-26 21:02:57 +07:00
smoogipoo
81a812e216 Rework MultiplayerTestScene to make use of OnlinePlayTestScene 2021-06-25 15:00:10 +09:00
Dean Herbert
acc06ca398 Merge branch 'master' into realm-key-binding-store 2021-06-16 02:14:58 +09:00
Bartłomiej Dach
24c249b17e Add test coverage 2021-06-10 22:40:49 +02:00
Dean Herbert
9044a20120 Merge branch 'master' into realm-key-binding-store 2021-06-10 13:58:08 +09:00
Dean Herbert
06275a6a7d Merge branch 'master' into legacy-skin-default-fallback 2021-06-04 16:00:30 +09:00
Samuel Cattini-Schultz
f51413ead9 Refactor to pass clockrate in constructor rather than deriving from mods 2021-06-03 16:09:42 +10:00
Dean Herbert
3ff9f9c89d Make FindProvider non-default 2021-05-31 21:29:47 +09:00
Dean Herbert
df703b68ec Merge branch 'master' into realm-key-binding-store 2021-05-25 13:41:48 +09:00
Bartłomiej Dach
e62e473bb2 Ignore possible null in multiplayer test
A null value will fail the test anyhow.
2021-05-15 00:09:34 +02:00
smoogipoo
10a4a5decb Merge branch 'master' into multiplayer-spectator-screen 2021-05-11 17:33:09 +09:00
Bartłomiej Dach
f7d9fb094e Reword & clarify comments 2021-05-04 22:59:10 +02:00
Bartłomiej Dach
9734758237 Simplify test case further 2021-05-04 22:48:57 +02:00
Salman Ahmed
45c0b74151 Use LINQ select for data assigning for simplicity
To avoid having to read through all of frames and ensure nothing is failing there
2021-05-04 23:41:50 +03:00
Salman Ahmed
4ceb9b1562 Avoid randomizing and overestimating logic with simple hardcoding
Not sure what was in my mind while I was pushing that..
2021-05-04 23:36:50 +03:00
Salman Ahmed
e00af3e71d Add test coverage 2021-05-04 09:45:59 +03:00
Dean Herbert
e0c129ca85 Merge branch 'master' into multiplayer-spectator-screen 2021-05-03 13:08:14 +09:00
Dean Herbert
f3c7694eeb Rename methods to match generally how these find-methods are named elsewhere 2021-04-28 16:57:52 +09:00
Dean Herbert
48d6c9ac4b Move snap/divisor helper methods to inside ControlPointInfo 2021-04-28 16:47:30 +09:00
Naxess
b8b6d0e861 Add tests for ClosestBeatDivisor
Used https://github.com/ppy/osu/pull/12558/files#diff-5c1f04c5b262ca3abbaf867aa91b62a60b66691323c286ad5aa0b75c153cc6ca as reference.
2021-04-27 16:54:47 +02:00
Dean Herbert
120fb8974d Combine more instances of test player IDs 2021-04-26 17:22:16 +09:00
Dean Herbert
2c1422b4f9 Add comment regarding teste edge case 2021-04-26 15:37:19 +09:00
Dean Herbert
c0b1c2f39b
Merge branch 'master' into realm-key-binding-store 2021-04-24 02:40:15 +09:00
smoogipoo
0ee73b8e53 Add failing test 2021-04-22 23:22:44 +09:00
Dean Herbert
78f274d51a Merge branch 'master' into realm-key-binding-store 2021-04-22 12:13:23 +09:00
jvyden
c39ab2c692
Add SessionStaticsTest 2021-04-18 23:04:28 -04:00
Dan Balasescu
ac8e462d32
Merge branch 'master' into refactor-framed-replay-input-hander 2021-04-15 21:48:58 +09:00
Dean Herbert
346e36d32a Make Mod.Description abstract and add missing descriptions 2021-04-15 14:36:26 +09:00
ekrctb
57ba7b7cbb Partially revert the changes of CurrentFrame and NextFrame for compatibility
Making those always non-null is postponed as when a replay's frame contains keypress the behavior is changed.
Previously, the key is pressed at the time of the first frame. But using non-null frames means the key is pressed at negative infinity.
However, I think the new way of always using non-null frames makes the client code so I plan to bundle the change to more breaking changes.
2021-04-13 15:55:23 +09:00
ekrctb
359fae895f Rename property 2021-04-12 18:50:25 +09:00
ekrctb
3c28c09ab5 Add more FramedReplayInputHandler tests 2021-04-12 16:18:35 +09:00
ekrctb
e19e8ff2a3 Rewrite FramedReplayInputHandler for robustness
This commit changes the semantics of `CurrentFrame` and `NextFrame` of the class.
The ordering of `NextFrame.Time` and `CurrentFrame.Time` was dependent on the current direction.
Now, it should always satisfy `CurrentFrame.Time <= CurrentTime <= NextFrame.Time` except at the start/end.
This change, however, doesn't break existing deriving classes if the template code pattern usage of interpolation is used.
The deriving class code can be simplified due to the elimination of nullable types. I didn't include those changes in this commit.

I removed `StreamingFramedReplayInputHandlerTest` for now, as it is almost-duplicate of `FramedReplayInputHandlerTest`. I'll include more tests in later commits.

This commit fixes #6150.
2021-04-12 16:18:11 +09:00
Samuel Cattini-Schultz
fe66b84bed Implement dynamic previous hitobject retention for Skill class
There is no reason we should be limiting skills to knowing only the previous 2 objects. This originally existed as an angle implementation detail of the original pp+ codebase which made its way here, but didn't get used in the same way.
2021-04-03 20:28:51 +11:00
Dean Herbert
491e583819 Merge branch 'master' into realm-migration-operation-blocking 2021-03-30 13:25:40 +09:00
Dean Herbert
f8cea5cae3 Merge branch 'master' into realm-migration-operation-blocking 2021-03-26 17:07:31 +09:00
Dean Herbert
4909eaf890 Add the ability to specify format provider (to make tests culture invariant) 2021-03-26 13:10:11 +09:00
Dean Herbert
6a7f926168 Change rounding to use a more general flooring approach 2021-03-26 13:10:11 +09:00
Dean Herbert
544117a494 Add test coverage of accuracy formatting function 2021-03-25 17:37:03 +09:00
Dean Herbert
03592fa696 Merge branch 'master' into realm-migration-operation-blocking 2021-03-19 21:33:26 +09:00
Bartłomiej Dach
aec859b4d1 Merge branch 'master' into fix-unsafe-skinnable-sample-play 2021-03-18 19:51:46 +01:00
smoogipoo
7fa5fd5647 Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
Bartłomiej Dach
f00089846b Merge branch 'master' into ruleset-filter-v3 2021-03-06 12:14:53 +01:00
Bartłomiej Dach
f9148eec20 Refactor filter query parsing helper methods
In preparation for exposition as public.
2021-03-03 21:34:14 +01:00
Bartłomiej Dach
faf5fbf49b Add tests for custom matching logic 2021-03-02 20:27:50 +01:00
Bartłomiej Dach
bf72f9ad1e Add tests for custom parsing logic 2021-03-02 20:22:56 +01:00
Bartłomiej Dach
e46543a4a9 Constrain operator parsing better 2021-03-02 19:56:36 +01:00
Samuel Cattini-Schultz
66643a97b0 Add a list of mods to Skill class
Although this isn't necessary for existing official rulesets and calculators, custom calculators can have use cases for accessing mods in difficulty calculation.
For example, accounting for the effects of visual mods.
2021-02-20 20:37:44 +11:00
Dean Herbert
00574a5288 Use ISample everywhere in Skin GetSample lookup path 2021-02-18 18:32:28 +09:00
smoogipoo
d3f0c0730d Merge branch 'master' into non-concurrent-sample-playback 2021-02-12 17:22:15 +09:00
Dean Herbert
5fbed05d04
Merge pull request #11551 from smoogipoo/fix-leave-room-race-2
Fix client potentially not leaving a room on exiting multiplayer
2021-02-08 19:23:14 +09:00
Bartłomiej Dach
0aaa62efc2 Add failing test case 2021-01-30 20:55:56 +01:00
Bartłomiej Dach
9ab1ad25eb Merge branch 'master' into fix-leave-room-race-2 2021-01-30 13:41:04 +01:00
Dean Herbert
c3aec3bfe4 Revert test changes to test original class/scope
Importantly, this removes the call to CatchUnobservedExceptions(), which was
outright incorrect (awaiting on the wrong task as a result) in the
original test code.
2021-01-29 16:20:26 +09:00
Dean Herbert
a30aecbafe Comment and add xmldoc 2021-01-27 20:01:21 +09:00
Dean Herbert
fcfb0d52c2 Proposal to use extension method instead of TaskChain class 2021-01-27 19:50:16 +09:00
smoogipoo
248989b3eb wip 2021-01-27 01:20:50 +09:00
smoogipoo
8c3b0a3167 Fix TaskChain performing the action in-line, add test 2021-01-26 22:47:37 +09:00
Dean Herbert
366f074f86 Better describe test steps to discern on failures 2021-01-25 16:53:39 +09:00
Bartłomiej Dach
adcef19ab2 Add coverage for operation tracker with failing tests 2021-01-23 15:59:14 +01:00
Dean Herbert
d480aa0e42 Don't check for all ignored files being present in original folder (the realm exception is platform dependent) 2021-01-21 22:57:55 +09:00
smoogipoo
de9d075f94 Initial sample + samplechannel rework 2021-01-19 17:11:40 +09:00
Dean Herbert
385c9cd2e2 Add test coverage 2021-01-05 13:14:16 +09:00
Dean Herbert
e3a41f6118 Rename variable to make more sense
It needs to be explicitly stated that the users in this list are related
to the *joined* room. Especially since it's sharing its variable name
with `SpectatorStreamingClient` where it has the opposite meaning (is a
list of *globally* playing players).
2020-12-29 14:27:35 +09:00
Bartłomiej Dach
f7407347f7 Add test coverage of PlayingUsers tracking 2020-12-28 20:07:05 +01:00
Bartłomiej Dach
1c31a4a6b6 Expose animation start time as mutable in interface 2020-11-22 13:11:22 +01:00
Bartłomiej Dach
240c1b0aef Add support for changing animation start time after load 2020-11-21 20:06:30 +01:00
Bartłomiej Dach
81d0b42930 Add failing test case 2020-11-21 19:51:27 +01:00
Dean Herbert
abaa532766 Add test coverage for streaming replay playback 2020-10-30 16:24:02 +09:00
Dean Herbert
f218a32e5f Merge branch 'master' into tourney-asset-refactor 2020-10-19 14:42:52 +09:00
smoogipoo
c4fdd35223 Fix same-type incompatibility through multimod 2020-10-14 19:53:37 +09:00
smoogipoo
7d2eeb9795 Fix test names 2020-10-14 19:18:04 +09:00
smoogipoo
d7a52e97ff Fix multimod difficulty combinations not generating correctly 2020-10-14 19:03:11 +09:00
Bartłomiej Dach
a7c43e17c2 Add test coverage 2020-10-10 15:41:48 +02:00
Dean Herbert
1989141968
Merge branch 'master' into tourney-asset-refactor 2020-10-07 21:34:07 +09:00
Bartłomiej Dach
ad42ce5639 Add failing test cases 2020-10-04 14:54:51 +02:00
Dean Herbert
d6fe5482d3 Add failing test showing missing control point removal 2020-10-02 15:28:21 +09:00
Dean Herbert
3cef93ee27 Centralise import test helper methods 2020-09-18 18:05:33 +09:00
Dean Herbert
89a2f20922 Use new CleanRun host class in import tests 2020-09-17 16:12:30 +09:00
Dean Herbert
835c8d74b7 Wait for two update frames before attempting to migrate storage 2020-09-17 16:12:18 +09:00
Bartłomiej Dach
a350802158 Fix wrong mono streak length handling in corner case 2020-09-10 20:50:26 +02:00
smoogipoo
d387c0cba0 Merge branch 'master' into morth-taiko-changes 2020-09-03 17:35:26 +09:00
Bartłomiej Dach
0980f97ea2 Replace precision check with absolute equality assert 2020-08-31 16:06:24 +02:00
Bartłomiej Dach
3b22b891d1 Add failing test cases 2020-08-31 14:29:18 +02:00
Keijia
f9fe37a8a5 Added test for "hp" filter keyword 2020-08-22 01:54:01 +03:00
Bartłomiej Dach
6c759f31f1 Add and use limited capacity queue 2020-08-18 20:19:58 +02:00
Shivam
c167727ac6 Merge branch 'master' into tourney-asset-refactor
# Conflicts:
#	osu.Game/IO/OsuStorage.cs
2020-08-09 12:38:41 +02:00
Dean Herbert
3a5784c410 Ensure directories are deleted before migration tests run 2020-07-09 15:08:15 +09:00
smoogipoo
1edfac4923 Fix test failing 2020-07-01 23:21:08 +09:00
Shivam
47a732ef60 Address review comments
Now asserting instead of an if-statement, change cast from OsuStorage to MigratableStorage and make internal virtual properties protected.
2020-06-24 23:01:56 +02:00