Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
UILocationSolver_test Class Reference

Description

Test:
verify a mechanism to resolve the desired location of an UI-element. The UILocationSolver is operated by the ViewLocator service, which itself is part of the InteractionDirector. In typical usage, the location rules are drawn from the ViewSpec-DSL, evaluated with the help of a Coordinate Resolver, based on the real UI topology existing at that moment, accessible in abstracted form through the LocationQuery interface. This test setup here mimics that invocation scheme, but replaces the real UI by an abstract tree notation embedded directly into the individual test cases.
See also
ui-location-solver.hpp
view-spec-dsl.hpp
UICoordResolver_test

Definition at line 66 of file ui-location-solver-test.cpp.

Private Member Functions

virtual void run (Arg)
 
void simple_usage_example ()
 
void verify_cornerCases ()
 
void verify_standardSituations ()
 

Member Function Documentation

virtual void run ( Arg  )
inlineprivatevirtual

Definition at line 70 of file ui-location-solver-test.cpp.

References UILocationSolver_test::simple_usage_example(), UILocationSolver_test::verify_cornerCases(), and UILocationSolver_test::verify_standardSituations().

+ Here is the call graph for this function:

void simple_usage_example ( )
inlineprivate
Test:
demonstrate the typical invocation and usage"

Definition at line 80 of file ui-location-solver-test.cpp.

References util::isnil(), gui::interact::locationQuery, UICoord::panel(), Record< VAL >::Mutator::set(), and gui::interact::UIC_VIEW.

Referenced by UILocationSolver_test::run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void verify_cornerCases ( )
inlineprivate
Test:
cover theoretical corner cases regarding the process of location solving.

Point in question are the requirements and limits when querying against one or several location specification clauses. The actual matching of a location pattern against a UI topology is beyond scope and covered elsewhere

  • empty clauses act as neutral element
  • prerequisites regarding the depth of a location clause relevant for solution
  • the impact of the query and especially its expected depth
  • completely explicit clauses vs clauses with wildcards
  • relevance of partial or total coverage for the solution
  • regular clauses vs. create clauses (which mandate creating parents as needed)
  • usage of the first applicable solution when several clauses are given

Definition at line 139 of file ui-location-solver-test.cpp.

References UICoord::Builder::append(), UICoord::Builder::create(), UICoord::currentWindow(), UICoord::firstWindow(), util::isnil(), UICoord::path(), UICoord::persp(), UICoord::Builder::persp(), UICoord::rebuild(), Record< VAL >::Mutator::set(), gui::interact::UIC_ELIDED, gui::interact::UIC_PANEL, gui::interact::UIC_PATH, gui::interact::UIC_PERSP, gui::interact::UIC_VIEW, gui::interact::UIC_WINDOW, and UICoord::window().

Referenced by UILocationSolver_test::run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void verify_standardSituations ( )
inlineprivate
Test:
emulate the relevant standard situations of view location resolution.

The typical location specifications to be expected in practice can be subsumed under a small selection of standard situations; this test demonstrates how these are triggered by specific tree configurations in a (hopefully) obvious way.

For this purpose, we create a single set of location clauses here, but evaluate them each time against different (simulated) UI tree configurations to verify that the expected resulting location is actually derived in all those cases.

Definition at line 348 of file ui-location-solver-test.cpp.

References UICoord::Builder::append(), UICoord::currentWindow(), UICoord::Builder::panel(), UICoord::persp(), Record< VAL >::Mutator::set(), gui::interact::UIC_TAB, gui::interact::UIC_VIEW, and UICoord::window().

Referenced by UILocationSolver_test::run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

+ Inheritance diagram for UILocationSolver_test:
+ Collaboration diagram for UILocationSolver_test:

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