Lumiera  0.pre.03
»edit your freedom«
CommandSetup_test Class Reference

Description

Test:
cover the behaviour of the CommandSetup helper intended for inserting actual command definitions into the Session.
See also
cmd.hpp
session-cmd.cpp actual usage example
steam::control::CommandSetup

Definition at line 97 of file command-setup-test.cpp.

Private Member Functions

virtual void run (Arg)
 
void verify_DefinitionRegistration ()
 
void verify_DefinitionSetup ()
 
void verify_standardUsage ()
 

Private Attributes

_Fmt pattern {" %d times."}
 

Member Function Documentation

◆ verify_DefinitionSetup()

void verify_DefinitionSetup ( )
inlineprivate
Test:
create some command definitions inline and verify their properties.

Definition at line 111 of file command-setup-test.cpp.

References CommandSetup::pendingCnt().

+ Here is the call graph for this function:

◆ verify_DefinitionRegistration()

void verify_DefinitionRegistration ( )
inlineprivate
Test:
actually issue the definitions captured as side-effect of the preceding test.

Definition at line 175 of file command-setup-test.cpp.

◆ verify_standardUsage()

void verify_standardUsage ( )
inlineprivate
Test:
demonstrate the standard usage pattern of command definition setup
  • static CommandSetup instances are created "somewhere"
  • when the ON_GLOBAL_INIT lifecycle event is issued, all command definitions collected thus far are invoked and thus inserted into the steam::control::CommandRegistry
  • from this point on, we may access a control::Command handle corresponding to these definitions, and we may create derived instances to bind parameters and invoke the operation.
Remarks
this test assumes that the static initialisation of the test fixture indeed created CommandSetup instances, which – as a side-effect – also scheduled the corresponding functors for invocation. Moreover the test-suite main() in fact triggers the lifecycle event ON_GLOBAL_INIT, causing these test command definitions to be issued alongside with all the real session commands defined in the application.

Definition at line 227 of file command-setup-test.cpp.

References AcceptAnyBind< TAR, BA, RET >::bind(), Command::storeDef(), and steam::cmd::test::anonymous_namespace{command-setup-test.cpp}::testString.

+ Here is the call graph for this function:
+ Inheritance diagram for CommandSetup_test:
+ Collaboration diagram for CommandSetup_test:

The documentation for this class was generated from the following file: