1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 05:27:40 +08:00
Commit Graph

632 Commits

Author SHA1 Message Date
Dean Herbert
0446bc8610 Fix game.ini getting left over by PlayerTestScene subclasses 2020-09-15 14:43:24 +09:00
Dean Herbert
879979ef57 Move host lookup to inside lazy retrieval to handle edge cases 2020-09-15 14:25:31 +09:00
Dean Herbert
234152b2fe Use host storage as LocalStorage for headless test runs 2020-09-15 14:17:40 +09:00
Dean Herbert
0ef4dfc192 Move more logic to base EditorTestScene 2020-09-14 15:27:08 +09:00
Dean Herbert
da02ee8828 Add ability to create a TestBeatmap with no HitObjects 2020-09-14 15:26:57 +09:00
Dean Herbert
c6e72dabd3 Add test coverage 2020-09-09 20:04:25 +09:00
Dean Herbert
5268eee0fb Avoid requiring sending the calling method for CleanRunHeadlessGameHost 2020-09-08 11:31:42 +09:00
smoogipoo
1143d5d992 Update class exclusion for dynamic compilation 2020-09-04 20:41:08 +09:00
smoogipoo
f793bf66e5 Remove rate adjustment from player test scene 2020-09-02 14:25:24 +09:00
Salman Ahmed
fafdbb0a81
Adjust recently added inline comment
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2020-08-22 17:26:54 +03:00
Salman Ahmed
7e838c8042 Add comment explaining why direct string lookups are used 2020-08-22 13:07:15 +03:00
Dean Herbert
70697cf1a0 Restore remaining editor components to use Beatmap.Track 2020-08-21 17:11:29 +09:00
Dean Herbert
d2c2e8bbe8 Revert some more usage of MusicController back to WorkingBeatmap 2020-08-21 15:17:21 +09:00
Salman Ahmed
deb5cc752b Merge remote-tracking branch 'upstream/master' into catch-combo-counter 2020-08-19 08:39:58 +03:00
Dean Herbert
93a8bc3d5a Remove local reset method in GameplayClockContainer 2020-08-17 22:36:09 +09:00
Dean Herbert
9e7a28002d Merge branch 'master' into beatmap-track-rework 2020-08-13 17:56:50 +09:00
Bartłomiej Dach
8fe5775ecb Allow testing mod combinations in ModTestScenes 2020-08-11 21:55:20 +02:00
smoogipoo
e87f50f74f Rename method 2020-08-07 22:31:41 +09:00
smoogipoo
b08ebe6f81 More inspections (rider is broken) 2020-08-07 21:14:45 +09:00
smoogipoo
961c6dab54 Fix more inspections 2020-08-07 21:08:03 +09:00
smoogipoo
5002d69f69 Update inspections 2020-08-07 20:51:56 +09:00
smoogipoo
61b632516e Ensure CurrentTrack is never null 2020-08-07 19:43:16 +09:00
smoogipoo
d1af1429b3 Fix inspection 2020-08-06 19:08:45 +09:00
smoogipoo
4cfca71d08 Fix a few test scenes 2020-08-06 19:05:15 +09:00
smoogipoo
c72ab9047e Cleanup test scene disposal 2020-08-06 17:15:33 +09:00
smoogipoo
5c05fe3988 Expose track from MusicController 2020-08-06 16:24:14 +09:00
smoogipoo
6e42b8219c Move track to MusicController, compiles 2020-08-06 16:24:14 +09:00
Salman Ahmed
d6f36457a8 Fix legacy font glyphs being mistaken for animation and getting "extrapolated" 2020-08-03 21:48:43 +03:00
smoogipoo
b361761d86 Add position display in contracted score panels 2020-07-31 22:02:25 +09:00
Dean Herbert
df3e2cc640 Fix potential crash due to cross-thread TrackVirtualManual.Stop 2020-07-28 12:08:15 +09:00
smoogipoo
9f7750e615 Add texture wrapping support to skins 2020-07-17 16:54:30 +09:00
Dean Herbert
43624381bf Change multiplayer tests to have null room by default 2020-07-09 18:55:53 +09:00
Bartłomiej Dach
c7d2ce12eb Add failing test cases 2020-06-22 20:08:32 +02:00
Bartłomiej Dach
07cbc3e683 Privatise and seal whatever possible 2020-06-21 23:05:10 +02:00
Bartłomiej Dach
4bba0c7359 Move abstract sample test to main game project 2020-06-21 22:28:19 +02:00
Salman Ahmed
eb64c4752c
Merge remote-tracking branch 'upstream/master' into cache-ruleset-dependencies-for-tests 2020-06-15 11:31:12 +03:00
Salman Ahmed
60381d5817
Remove IRulesetTestScene and use OsuTestScene.CreateRuleset() instead 2020-06-15 11:30:48 +03:00
Dean Herbert
0b6e8783d4
Merge branch 'master' into test-scene-create-ruleset 2020-06-12 17:06:27 +09:00
Salman Ahmed
4fb71eeb20
Move setting up the ruleset bindable to top-base test scene 2020-06-10 18:23:31 +03:00
Salman Ahmed
efd5e14410
Clarify why ruleset bindable must be set at the BDL of any base test scene 2020-06-06 19:20:06 +03:00
Salman Ahmed
0f78af7252
Remove unnecessary disabled check
I have a bad memory here, til.
2020-06-06 19:19:30 +03:00
smoogipoo
caf94df0d0 Merge branch 'master' into multiplayer-beatmap-checksum 2020-06-05 19:16:05 +09:00
Salman Ahmed
741fa20149
Use CreateRuleset() for editor test scenes as well 2020-06-04 00:47:10 +03:00
Salman Ahmed
c72592c52c
Remove bindable-disabling logic and don't tie immediately to CreateRuleset() 2020-06-04 00:44:28 +03:00
Salman Ahmed
bbad70c3f0
Fix mod perfect test scenes failing due to null ruleset provided
Just a workaround for now, a better fix may be to put the test data creation in an action that is guaranteed to be invoked after the test scene has fully loaded (all dependencies would've been resolved by then).
2020-06-04 00:43:11 +03:00
Salman Ahmed
136e10086a
Set the ruleset bindable value at the BDL for its subclasses usages
There are test scenes using current value of ruleset bindable on their BDL (example in TestSceneSliderSnaking's BDL)
2020-06-04 00:37:06 +03:00
Salman Ahmed
11da045d8c
Reorder declaration position of ruleset-creation methods
Should be recognized as a normal protected method in its declaring class.
2020-06-03 23:43:18 +03:00
Salman Ahmed
84b40ea2c6
Merge remote-tracking branch 'upstream/master' into test-scene-create-ruleset
# Conflicts:
#	osu.Game.Rulesets.Catch.Tests/TestSceneBananaShower.cs
#	osu.Game.Rulesets.Catch.Tests/TestSceneHyperDash.cs
#	osu.Game/Tests/Visual/ModTestScene.cs
#	osu.Game/Tests/Visual/OsuTestScene.cs
2020-06-03 22:00:02 +03:00
smoogipoo
3c85561cdc Add tests 2020-06-02 14:31:43 +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
smoogipoo
51e74687f8 Merge branch 'editor-scrolling-playfield-support' of https://github.com/peppy/osu; branch 'results-screen-condensed-panel' of https://github.com/smoogipoo/osu into results-screen-condensed-panel 2020-05-26 15:39:39 +09:00
smoogipoo
d5ea076427 Merge branch 'master' into results-screen-condensed-panel 2020-05-22 20:45:39 +09:00
Dean Herbert
866db629d6 Fix remaining test failures 2020-05-22 18:23:24 +09:00
Dean Herbert
dd09d7830d Cache and resolve editor clock as EditorClock in all cases 2020-05-22 16:44:06 +09:00
smoogipoo
45b59f574d Fix TestSceneResultsScreen crashing 2020-05-21 18:43:12 +09:00
smoogipoo
9f868be872 Create common TestScoreInfo type 2020-05-21 18:39:22 +09:00
Dean Herbert
bac78707de Move more logic to column to both clean things up and fix tests 2020-05-21 14:25:37 +09:00
Dean Herbert
82d6549161 Pass down snap result and remove local TimeAt usage 2020-05-20 21:01:29 +09:00
Dean Herbert
9638064741 Tidy up ruleset assignment code 2020-05-20 10:06:23 +09:00
Dean Herbert
db4e3047dd Add test for final sample output 2020-05-19 23:28:13 +09:00
Dean Herbert
be3a0a3c1d Merge branch 'master' into remove-requiredtypes 2020-05-16 18:28:14 +09:00
smoogipoo
648999a2de Remove all RequiredTypes usages 2020-05-16 18:17:12 +09:00
Dean Herbert
44319c1b71 Commit missed change 2020-05-12 20:26:34 +09:00
Dean Herbert
de50b725d5 Fix mod failure checks executing actual game logic 2020-05-12 20:08:35 +09:00
Dean Herbert
d0a8c0fa71 Add kiai support to osu!taiko skinned playfields 2020-04-30 16:43:00 +09:00
smoogipoo
7d54d4b800 Improve test scene 2020-04-28 18:36:10 +09:00
Dean Herbert
fe0038ed14
Merge branch 'master' into fix-mania-placement 2020-04-24 17:00:12 +09:00
Salman Ahmed
227503c0af
Merge remote-tracking branch 'upstream/master' into test-scene-create-ruleset 2020-04-23 16:25:33 +03:00
Salman Ahmed
2fa47992dc
Seal the ruleset creation methods and let abstract method take their place
Also makes `CreatePlayerRuleset()` and `CreateRulesetForSkinProvider()` not-null to avoid unwanted behaviour with their derivers
2020-04-23 13:27:12 +03:00
Salman Ahmed
0a0ea39431
Mark the top ruleset creation method as can-be-null 2020-04-23 13:24:30 +03:00
smoogipoo
6df45164fa Expose direction from scrolling test container 2020-04-23 11:17:16 +09:00
smoogipoo
40f11ed15c Resolve broken test scene 2020-04-23 10:37:05 +09:00
smoogipoo
08982e0e00 Ensure editor tests wait for load to complete 2020-04-22 19:49:21 +09:00
smoogipoo
0a34fddcc3 Fix TestBeatmap not setting appropriate ruleset ID 2020-04-22 19:38:27 +09:00
Dean Herbert
af32f51116
Merge pull request #8800 from iiSaLMaN/allow-cancelling-completion
Fix results screen pushed after rewinding in-between push delay
2020-04-21 12:49:49 +09:00
Salman Ahmed
fc6c245de5 Replace all judged event logic with HasCompleted bindable 2020-04-19 05:36:04 +03:00
Dean Herbert
d4788e39bb Merge branch 'master' into taiko-drumroll-skinning 2020-04-17 19:30:18 +09:00
Salman Ahmed
7f791dcdf0 Re-enable ruleset bindable before setting defined ruleset in case it's disabled
Happens on cases like restarting the test scene by clicking directly on it on the browser (*where it for some reason reloads the entire test scene*)
2020-04-17 11:18:05 +03:00
Salman Ahmed
155bc8b49a Remove ModTestScene ruleset parameter on constructor and use CreateRuleset instead 2020-04-17 11:17:59 +03:00
Salman Ahmed
92df4e3a9e Remove PlayerTestScene constructor and use CreateRuleset method instead 2020-04-17 11:17:51 +03:00
Salman Ahmed
5fa6bcb5a3 Move SkinnableTestScene into using the global CreateRuleset method 2020-04-17 11:17:44 +03:00
Salman Ahmed
67bd7bfa39 Add CreateRuleset in OsuTestScene for scenes that depend on it 2020-04-17 11:12:25 +03:00
Dean Herbert
4eefe47ce3
Merge branch 'master' into fix-0-customsampleset 2020-04-16 11:20:31 +09:00
Dean Herbert
18c28390ef Setup drumroll testing 2020-04-15 16:29:39 +09:00
smoogipoo
b29957798f Fix no audiomanager in test scene working beatmap 2020-04-14 21:05:42 +09:00
smoogipoo
bde0b259c1 Improve slider placement test scene 2020-04-13 15:31:54 +09:00
Salman Ahmed
2b4208bebf Cache ruleset dependencies if the scene tests ruleset-specific components 2020-04-11 04:23:31 +03:00
Dan Balasescu
7951a52a15
Merge branch 'master' into per-ruleset-skinnable-tests 2020-04-07 22:59:42 +09:00
Dean Herbert
c9872f1d93 Retrieve dll resources using a more reliable method 2020-04-07 18:55:03 +09:00
Dean Herbert
0a340bac5a Ensure the correct (up-to-date) ruleset is retrieved 2020-04-07 16:20:13 +09:00
Dean Herbert
8506029237 Fix SkinnableTestScene losing test resources on dynamic recompilation 2020-04-07 13:46:37 +09:00
smoogipoo
1f797207f7 Rework lookups to not require total playfield columns 2020-04-03 12:31:05 +09:00
Dean Herbert
0d4830550e Fix tooltips not showing inside ManualInputManagerTestScenes 2020-03-30 19:15:44 +09:00
Dean Herbert
800e395bc8 Merge branch 'master' into replay-recording 2020-03-25 20:20:59 +09:00
Dean Herbert
6d81da5419
Merge branch 'master' into video-offset 2020-03-25 11:28:59 +09:00
Dean Herbert
546772192c Add helper method to convert to legacy mods enums 2020-03-24 13:07:51 +09:00
Dean Herbert
0b728f483f Rename base test class to help avoid incorrect reference 2020-03-23 10:01:33 +09:00
Dan Balasescu
1d556bfc5f
Merge branch 'master' into video-offset 2020-03-11 15:13:18 +09:00
Dean Herbert
0be423183d Rename data class 2020-03-11 00:36:56 +09:00
Bartłomiej Dach
c803de2b49 Fix player instantiation
Since ModTestScene.CreatePlayer would apply mods in addition to
instantiating the player, overriding it could lead to mistakenly also
overriding the code that was supposed to set up the test via
currentTestData.

Make ModTestScene.CreatePlayer sealed, which ensures that mod &
autoplay changes are applied, and expose ModTestScene.CreateModPlayer
instead which has the expected semantics.
2020-03-08 14:18:45 +01:00
Bartłomiej Dach
cc5cae4db9 Do not transition to result screen 2020-03-08 14:08:49 +01:00
Bartłomiej Dach
d5dda05d98 Merge branch 'master' into fix-perfect-judgements 2020-03-08 14:06:18 +01:00
voidedWarranties
76c832518f Render video as a part of the storyboard 2020-03-07 21:32:03 -08:00
Dean Herbert
3295f8657a Restore clamp behaviour 2020-03-06 22:44:11 +09:00
Dean Herbert
c3ad08f230 Remove wild writeline 2020-03-06 02:18:35 +09:00
Dean Herbert
e3509c742c Track time in a simpler way in TrackVirtualManual 2020-03-06 02:03:19 +09:00
Dean Herbert
ece263131b Update to follow new naming/structure 2020-03-06 00:36:05 +09:00
Dean Herbert
5b8aaba4a6 Merge branch 'master' into fix-perfect-judgements 2020-03-06 00:18:05 +09:00
Dean Herbert
2b89fb68f7
Merge branch 'master' into fix-testscene-rate 2020-03-05 23:38:33 +09:00
Dan Balasescu
f12a515ca5
Merge branch 'master' into mod-testscene 2020-03-05 17:10:24 +09:00
Dan Balasescu
f7777ecb01
Merge pull request #8142 from peppy/add-star-difficulty-max-migration
Fix song select max displayable star difficulty getting stuck at wrong maximum
2020-03-05 17:10:10 +09:00
Dean Herbert
a311ace626 Add migration test 2020-03-05 15:07:00 +09:00
Dean Herbert
26ce0d05d6 Use autoplay mod rather than local replay provider 2020-03-05 11:33:30 +09:00
Dean Herbert
77fddcd2c2 Merge branch 'less-test-players' into mod-testscene 2020-03-05 11:26:33 +09:00
Dean Herbert
5200633f9f Centralise TestPlayer implementations as much as possible 2020-03-05 11:25:07 +09:00
Dean Herbert
fadebcdc03 Move all sets to object initialiser for code formatting reasons 2020-03-05 10:21:25 +09:00
Dean Herbert
3b19467ead ModTestCaseData -> ModTestData 2020-03-05 10:19:42 +09:00
Dean Herbert
0f1f1d1a6b Remove unused "name" parameter 2020-03-05 10:18:37 +09:00
Dean Herbert
ce3786cfd9 Rename to ModTestScene (is no longer a sandbox) 2020-03-05 10:11:27 +09:00
voidedWarranties
c3f840cc1a Fix Autoplay = false and AllowFail behavior 2020-03-03 17:12:01 -08:00
smoogipoo
a1aecd4c39 Fix TrackVirtualManual not respecting rate adjustments 2020-03-03 13:01:28 +09:00
smoogipoo
1e26df64b6 Fix constructor test failures 2020-03-03 12:58:07 +09:00
smoogipoo
90c2f7bd89 Fail tests by default 2020-03-03 12:13:36 +09:00
smoogipoo
6fb52e5370 Fix custom rulesets not being testable 2020-03-02 13:25:36 +09:00
smoogipoo
cd43a0c9e8 Better check for failing state 2020-03-02 13:24:07 +09:00
smoogipoo
e801ad514b Fix ruleset nullref 2020-03-02 13:24:02 +09:00
smoogipoo
6d939e9d41 Add failing test scenes 2020-03-02 12:42:48 +09:00
smoogipoo
ce7cbf29ca Move to using test methods for better separation 2020-03-02 12:20:25 +09:00
smoogipoo
239cfddcbb Improve test scenes/cases 2020-03-02 10:50:41 +09:00
smoogipoo
5c15704c81 Improve abstract structure for testability 2020-03-02 10:28:39 +09:00
smoogipoo
a02c5710ac Rename base class 2020-03-02 10:06:49 +09:00
voidedWarranties
089ec4c792 Test scene for mod development 2020-02-29 21:16:28 -08:00
Dean Herbert
28c8a9f479 Expose created drawables in SkinnableTestScene 2020-02-17 17:19:46 +09:00
Dean Herbert
bdd6f3af99 Show skinnable test skin names and autosized component sizes 2020-02-17 16:09:31 +09:00
Dean Herbert
06fcb48d65 Move SkinnableTestScene to main project for consumption by other rulesets 2020-02-17 14:19:39 +09:00
smoogipoo
cef682aa03 Make WorkingBeatmap non-disposable 2020-02-10 17:02:01 +09:00
Dean Herbert
91203c2b12
Merge branch 'master' into placement-display-in-timeline 2020-02-08 01:50:24 +09:00
Dean Herbert
e31d69c749 Add commit status to EndPlacement; call BeginPlacement on initial movement 2020-02-07 18:02:48 +09:00
Dan Balasescu
7b70481a10
Merge branch 'master' into fix-editor-test-scene 2020-02-07 17:20:43 +09:00
Dean Herbert
9997ae17bc Fix editor test scene exiting after loading 2020-02-07 16:42:56 +09:00
Bartłomiej Dach
5fde4f2c0c Fix lifetime calculation in overlapping algorithm
Changes to lifetime calculation in scrolling rulesets introduced in
#7367, which aimed to account for the distance between hit objects'
origin and its edge entering the scrolling area, fixed some issues with
hitobjects appearing abruptly, but also regressed some other scenarios.

Upon investigation, the regression was localised to the overlapping
scroll algorithm. The reason for this was two-fold:

* The previous code used TimeAt() to calculate the time of travel from
  the hit object's edge to its origin. For other algorithms, that time
  can be accurately reconstructed, because they don't have periods of
  time where there are multiple hit objects scrolling at different
  velocities.

  That invariant does not hold for the overlapping algorithm, therefore
  it is possible for different values to be technically correct for
  TimeAt(). However, the only value that matters for the adjustment
  is the one that's indicated by the control point that applies to the
  hit object origin, which can be uniquely identified.

* Additionally, the offset returned (even if correct) was applied
  externally to the hit object's start time and passed to
  GetDisplayStartTime(). In the overlapping algorithm, the choice of
  control point used in GetDisplayStartTime() is important, since
  the value of the speed multiplier is read within.

  Externally rewinding the hit object's start time meant that in some
  cases the speed multiplier of the *previous* control point is applied,
  which led to hit objects appearing too late if the scrolling rate
  decreased.

Because of the above, modify GetDisplayStartTime() to take the offset
into account in all algorithms, and apply the adjustment correctly
inside of them. The constant and sequential algorithms needed no
adjustment from the previous logic, since:

* the constant algorithm disregarded control points, and
* the sequential algorithm would effectively rewind to time = 0,
  calculate the absolute distance from time = 0 to the hit object start,
  apply the origin offset *to the absolute distance*, and then convert
  back to time, applying all control points in sequence. Due to this
  it was impossible for control points to get mixed up while
  calculating.

As for the overlapping algorithm, the high-level logic is as follows:

* The distance that the origin has to travel is the length of the scroll
  plus the distance from the origin to the object edge.
* The above distance divided by the scroll length gives the relative
  scroll lengths that the object has to travel.
* As one relative scroll length takes one time range, the relative
  travel length multiplied by the time range gives the absolute travel
  time of the object origin.
* Finally, the control point multiplier applicable at origin time is
  applied to the whole travel time.

Correctness of the above is demonstrated by visual tests added before
and headless unit tests of the algorithms themselves. The sequential
scroll algorithm was not covered by unit tests, and remains uncovered
due to floating-point inaccuracies that should be addressed separately.
2020-02-06 23:13:28 +01:00
Dean Herbert
09273d1da9 Fix test scene not correctly building a playable beatmap 2020-02-05 18:35:31 +09:00
Bartłomiej Dach
434c0d92e4 Use Bindable{Float,Double}s everywhere
To avoid further floating-point comparison bugs, remove all usages of
Bindable<{float,double}>, replacing them with their
Bindable<Float,Double> counterparts.
2020-02-01 22:50:29 +01:00
Dean Herbert
c4331f34d5 Consume TearDownSteps 2020-01-31 22:09:39 +09:00
Dean Herbert
5f48affcba Centralise screen exit logic to ScreenTestScene 2020-01-31 14:19:29 +09:00
Dean Herbert
0e0c730095 Add a method to recycle test storage between runs 2020-01-28 19:44:32 +09:00
Dean Herbert
1f0aaabf7b Add tests 2020-01-27 12:21:17 +09:00
Dean Herbert
bd96cf94a6 Begin refactoring SelectionBlueprint to handle non-drawable HitObjects 2020-01-21 12:47:14 +09:00
smoogipoo
878e9f182e Add storyboard sample test scene 2020-01-02 15:23:41 +09:00