1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00
Commit Graph

323 Commits

Author SHA1 Message Date
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
Shivam
063503f4db Move null check outside of the loop 2020-06-24 20:43:56 +02:00
Shivam
af11340849 Fix nullref exceptions and redundant explicit type 2020-06-24 02:13:28 +02:00
Shivam
c32ef5e718 Address formatting issues 2020-06-24 00:37:29 +02:00
Shivam
a47d34f1db make ignore properties protected virtual get-only in base 2020-06-23 23:34:26 +02:00
Shivam
21774b8967 Move static properties to parent class and inherit OsuStorage from it 2020-06-22 11:38:50 +02:00
Shivam
1d4d749b53 Undo blank line removal
Was too excited to add blank lines before submitting the PR that I overdid it
2020-06-11 15:56:34 +02:00
Shivam
222ac86304 Add newlines at the end of the file 2020-06-11 15:52:14 +02:00
Dean Herbert
800c46f752 Fix test function override 2020-06-02 14:39:15 +09:00
Salman Ahmed
2c6887e610
Remove unnecessary use of and remove StartupStorage 2020-05-31 19:49:03 +03:00
Salman Ahmed
82fe99cf4a
Replace any potential usage of Environment.CurrentDirectory with a new RuntimeInfo.StartupDirectory
Using `Environment.CurrentDirectory` for storing / reading files is dangerous as the current directory is mutable and can be changed when performing a certain operation (like opening solutions in roslyn type reference builder for example).
2020-05-31 02:24:49 +03:00
Bartłomiej Dach
bc6b64b1d7 Add failing test 2020-05-17 22:10:09 +02:00
Dean Herbert
aea192080a Fix incorrect storage name 2020-05-15 13:02:46 +09:00
Dean Herbert
7641507c90 Ensure test directories are deleted before subsequent run 2020-05-15 10:45:57 +09:00
Dean Herbert
0690d81bbb Add protection against migrating to a nested folder 2020-05-15 10:40:26 +09:00
Dean Herbert
19f117ae53 Update test logic for new exception type 2020-05-15 10:28:03 +09:00
Dean Herbert
827d75b152 Revert "Add protection against migrating to a nested folder"
This reverts commit ef8375b442.
2020-05-14 22:44:27 +09:00
Dean Herbert
ef8375b442 Add protection against migrating to a nested folder 2020-05-14 22:42:42 +09:00
Dean Herbert
e4a23b3e7d Fix ignored excluding more than top level 2020-05-12 12:39:04 +09:00
Dean Herbert
6c350db097 Add connection flushing support 2020-05-11 21:39:44 +09:00
Dean Herbert
36640f5dda Merge branch 'master' into migration-backend 2020-05-11 18:52:36 +09:00
Dean Herbert
384862d48b Fix incorrect relative paths when using GetStorageForDirectory 2020-05-10 13:20:13 +09:00
Dean Herbert
5dda94187e Add more edge case testing 2020-05-09 20:13:44 +09:00
Dean Herbert
1348bdaa15 Merge branch 'custom-data-directory' into migration-backend 2020-05-09 19:32:29 +09:00
Dean Herbert
abb32b3256
Merge branch 'master' into custom-data-directory 2020-05-08 10:05:11 +09:00
Dean Herbert
5e65bda8d8 Add test coverage 2020-05-07 22:12:24 +09:00
Dean Herbert
4ac5ed71f4 Remove redundant string interpolation 2020-05-07 21:48:57 +09:00
Dean Herbert
90e17853a8 Update tests in line with framework changes 2020-05-07 18:12:11 +09:00
alex
0e2ccac33b Add spaces to comments 2020-05-04 18:36:24 -07:00
Dean Herbert
6621d363da Add basic custom data directory support 2020-05-04 17:01:05 +09:00
Bartłomiej Dach
8118747732 Make PeriodTracker actually immutable 2020-05-02 01:33:33 +02:00
Salman Ahmed
6fa9feb15c
Merge remote-tracking branch 'upstream/master' into add-interval-list 2020-04-29 05:14:40 +03:00
Salman Ahmed
6e76e5900a
Rename is-in-any check method to a more legible name 2020-04-29 05:11:44 +03:00
Salman Ahmed
587f946dc6
Adjust, simplify and make the test code more flexible to some degree 2020-04-29 05:11:43 +03:00
Alchyr
3d975f30a3 Merge branch 'timing-equivalence' of https://github.com/Alchyr/osu into timing-equivalence 2020-04-08 01:45:53 -07:00
Alchyr
65823fb2e1 Use redundancy test 2020-04-08 01:42:35 -07:00
Bartłomiej Dach
65db64e13e Add failing test cases 2020-04-07 22:41:20 +02:00
Dean Herbert
036efb9947
Merge branch 'master' into fix-effect-points 2019-12-18 01:43:15 +09:00
Huo Yaoyuan
927ba4c113 Update expected exception in test. 2019-12-17 15:20:05 +08:00
smoogipoo
36f541d8e5 Fix incorrect asserts 2019-12-13 18:14:06 +09:00
smoogipoo
87a7f340e3 Fix first sample point being treated as redundant 2019-12-13 18:14:01 +09:00
Huo Yaoyuan
205eda8566 Use readonly field when not reflected. 2019-11-12 19:56:43 +08:00
Huo Yaoyuan
ccc8aa6fa4 Apply brace style. 2019-11-11 20:13:13 +08:00
Dean Herbert
4e80eda6da Add test coverage 2019-10-28 11:40:42 +09:00
iiSaLMaN
40fc655b50 Add equality check test to ensure correct values 2019-10-17 01:19:50 +03:00
Bartłomiej Dach
70842f71f4 Fix floating point handling in filter intervals
Due to floating-point rounding and representation errors, filters could
wrongly display results incongruous with the wedge display text (ie.
a beatmap with the BPM of 139.99999 would be displayed as having 140
BPM and also pass the bpm<140 filter).

Apply tolerance when parsing floating-point constraints. The tolerance
chosen is half of what the UI displays for the particular values (so
for example half of 0.1 for AR/DR/CS, 0.01 for stars, etc.)

Tests updated accordingly.
2019-09-22 00:20:55 +02:00
Bartłomiej Dach
b262ba13cd Add creator= and artist= filters
To match stable, add creator= and artist= filters to the beatmap
carousel on song select screen. Contrary to stable, this implementation
supports phrase queries with spaces within using double quotes.

The quote handling is not entirely correct (can't nest), but quotes
should rarely happen within names, and it is an edge case of an edge
case - leaving best-effort as is. Test coverage also included.
2019-09-22 00:20:55 +02:00
Bartłomiej Dach
41569fd2b6 Add filter evaluating unit tests
Introduce unit tests covering the actual evaluation of filters for
beatmaps. Partially covers most scenarios.
2019-09-22 00:20:54 +02:00
Bartłomiej Dach
d11d932a87 Add filter parsing tests
Introduce unit tests covering parsing for the originally introduced
filtering features. The introduced improvements (lower and upper
interval and decimal point support) also tested.
2019-09-22 00:20:54 +02:00
Dean Herbert
5e2adf59be Enforce frame accuracy for tests 2019-07-10 11:53:34 +09:00
Dean Herbert
bd53a96507 Ensure tests cannot run forever 2019-07-10 11:52:55 +09:00
Dean Herbert
2a3601e43b Fix test class filename case 2019-07-10 11:42:30 +09:00
Dean Herbert
73de146fb4 Update test null check to match 2019-03-31 01:42:38 +09:00
Dean Herbert
82b9dfdeb1 Add important section rewind tests 2019-03-29 11:37:12 +09:00
Dean Herbert
70f99400ad Fix many behavioural issues and add tests 2019-03-28 19:28:13 +09:00
smoogipoo
7e41fbc29b Remove LegacyDifficultyCalculator 2019-02-21 13:12:37 +09:00
smoogipoo
93b7b51d0a timeRate -> clockRate 2019-02-19 14:29:23 +09:00
smoogipoo
9d8ba4073c Add tests for LimitedCapacityStack 2019-02-19 14:18:49 +09:00
smoogipoo
a8faa942a6 Implement new difficulty calculator structure 2019-02-18 14:49:43 +09:00
Dean Herbert
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
Dean Herbert
be37f3c328 Rename NoModMod 2018-11-30 17:35:13 +09:00
Dean Herbert
d97a15a504 Add IMod and change ShortenedName to Acronym 2018-11-30 17:16:00 +09:00
smoogipoo
8f7334874c Fix up performance calculators 2018-06-14 16:04:48 +09:00
smoogipoo
83ff47ec80 Rewrite difficulty mod combinations 2018-06-06 16:20:17 +09:00