Lumiera  0.pre.03
»edit your freedom«
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

◆ simple_usage_example()

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

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

◆ verify_cornerCases()

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.

◆ verify_standardSituations()

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.

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

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