mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 11:06:11 -10:00
Fix test guidance sentence
This commit is contained in:
1 parent
08a0f3e3b1
commit
7c7f781095
1 file changed
+1
-1
+1
-1
@@ -2134,7 +2134,7 @@ The renderer module re-exports the game's wgpu types.
|
||||
|
||||
Every `Host` method defaults to a panic naming it (`not implemented: Host::tell`), so a test double implements
|
||||
only what its hook calls, and an unexpected call fails loudly. Drive the hook through
|
||||
`horizon_client::mod_api::dispatch_<hook>(&mut host, &mods, args…)`, which builds the event as the game does. A
|
||||
`horizon_client::mod_api::dispatch_<hook>(&mut host, &mods, args…)`, which builds the event as the game does.
|
||||
If a `Host` method returns a game value a test can't build, a double can return `None` instead, as with
|
||||
`acting_player() -> Option<NativeServerPlayer>`. If the dispatch function itself takes an unconstructible value,
|
||||
such as `dispatch_perform_command`'s `&NativeServerPlayer`, test the logic beneath the hook instead. The level
|
||||
|
||||
Reference in new issue
Block a user