Skip to main content

GameTests

Trait GameTests 

pub trait GameTests {
    // Required methods
    fn register_test(
        &mut self,
        id: &str,
        definition: GameTestDefinition,
    ) -> Result<(), &'static str>;
    fn register(
        &mut self,
        id: &str,
        function: Arc<dyn GameTestFunction>,
    ) -> Result<(), &'static str>;
}
Expand description

Registration service supplied to the registration hook.

Required Methods§

fn register_test( &mut self, id: &str, definition: GameTestDefinition, ) -> Result<(), &'static str>

Register a test instance; duplicate ids and invalid timing are refused.

fn register( &mut self, id: &str, function: Arc<dyn GameTestFunction>, ) -> Result<(), &'static str>

Register a unique namespaced function. Vanilla identifiers are reserved.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§