39 using LERR_(INDEX_BOUNDS);
79 CHECK (isnil (undef));
81 UICoord uic{
"Γ",
"Δ",
"Θ",
"Ξ",
"Σ",
"Ψ",
"Φ",
"Ω"};
82 CHECK (not isnil (uic));
83 CHECK (8 == uic.size());
85 CHECK (
"Γ-Δ-Θ-Ξ-Σ-Ψ-Φ-Ω" == join(uic,
"-"));
98 CHECK (
"Ψ-Φ-Ω" == join(uic.pathSeq(),
"-"));
99 CHECK (
"Ψ/Φ/Ω" == uic.getPath());
104 CHECK (uic[i] == *ii);
110 CHECK (
"UI:Γ[Δ]-Θ.Ξ.Σ/Ψ/Φ/Ω" ==
string(uic));
111 CHECK (
"Γ[Δ]-Θ.Ξ.Σ" == uic.getComp());
112 CHECK (
"Ψ/Φ/Ω" == uic.getPath());
115 uic =
UICoord{
nullptr,
nullptr,
"Θ",
nullptr,
"Σ",
nullptr,
"Φ"};
116 CHECK (7 == uic.size());
119 CHECK (
"UI:?-Θ.*.Σ/*/Φ" ==
string(uic));
136 CHECK (
"UI:window" ==
string(uic1));
137 CHECK (
"UI:window[*]-*.view" ==
string(uic2));
138 CHECK (1 == uic1.
size());
139 CHECK (4 == uic2.
size());
149 CHECK (
"view" == uic2.
getView());
150 CHECK (
"" == uic1.
getTab());
151 CHECK (
"" == uic2.
getTab());
154 CHECK (
"window" == uic1.
getComp());
155 CHECK (
"window[*]-*.view" == uic2.
getComp());
162 CHECK (4 == uic3.
size());
163 CHECK (
"UI:?.view" ==
string(uic3));
167 CHECK (
"view" == uic3.
getView());
170 CHECK (4 == uic4.
size());
171 CHECK (
"UI:?[perspective]-*.view" ==
string(uic4));
173 uic4 = uic3.
append(
"tab");
174 CHECK (5 == uic4.
size());
175 CHECK (
"UI:?.view.tab" ==
string(uic4));
177 CHECK (4 == uic4.
size());
178 CHECK (
"UI:?-panel.view" ==
string(uic4));
179 uic4 = uic4.
tab(555);
180 CHECK (5 == uic4.
size());
181 CHECK (
"UI:?-panel.view.#555" ==
string(uic4));
186 CHECK (9 == uic4.
size());
187 CHECK (
"UI:?-panel.view.#555/α/β/γ/δ" ==
string(uic4));
189 CHECK (3 == uic4.
size());
190 CHECK (
"UI:?-panel" ==
string(uic4));
192 CHECK (0 == uic4.
size());
193 CHECK (
"UI:?" ==
string(uic4));
201 CHECK (
"UI:?" ==
string(uic));
205 uic = uic.
path(
"ἁρχή");
206 CHECK (
"UI:?/ἁρχή" ==
string(uic));
208 CHECK (
"ἁρχή" == uic.
getPath());
210 uic = uic.
path(
"α/β/γ");
211 CHECK (
"UI:?/α/β/γ" ==
string(uic));
213 CHECK (
"α/β/γ" == uic.
getPath());
216 CHECK (
"UI:?/α/β/γ/δ" ==
string(uic));
218 CHECK (
"α/β/γ/δ" == uic.
getPath());
221 CHECK (
"UI:?/α/β/γ/δ" ==
string(uic));
223 CHECK (
"α/β/γ/δ" == uic.
getPath());
225 uic = uic.
append(
"ε/λ/ον");
226 CHECK (
"UI:?/α/β/γ/δ/ε/λ/ον" ==
string(uic));
228 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
231 CHECK (12 == uic.
size());
248 CHECK (
"UI:?.ειδος/α/β/γ/δ/ε/λ/ον" ==
string(uic));
249 CHECK (
"?.ειδος" == uic.
getComp());
250 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
251 CHECK (12 == uic.
size());
254 CHECK (
"UI:?/α/β/γ/δ/ε/λ/ον" ==
string(uic));
256 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
258 uic = uic.
view(
"ειδος");
259 CHECK (
"UI:?.ειδος.*/α/β/γ/δ/ε/λ/ον" ==
string(uic));
260 CHECK (
"?.ειδος.*" == uic.
getComp());
261 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
264 CHECK (
"UI:?-panel.ειδος.*/α/β/γ/δ/ε/λ/ον" ==
string(uic));
265 CHECK (
"?-panel.ειδος.*" == uic.
getComp());
266 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
268 uic = uic.
view(
nullptr);
269 CHECK (
"UI:?-panel.*.*/α/β/γ/δ/ε/λ/ον" ==
string(uic));
270 CHECK (
"?-panel.*.*" == uic.
getComp());
271 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
274 CHECK (
"UI:?-panel.*.#8/α/β/γ/δ/ε/λ/ον" ==
string(uic));
275 CHECK (
"?-panel.*.#8" == uic.
getComp());
276 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
279 CHECK (
"UI:?-panel.*/α/β/γ/δ/ε/λ/ον" ==
string(uic));
280 CHECK (
"?-panel.*" == uic.
getComp());
281 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
284 CHECK (
"UI:?-panel.*. /α/β/γ/δ/ε/λ/ον" ==
string(uic));
285 CHECK (
"?-panel.*. " == uic.
getComp());
286 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
288 uic = uic.
prepend(
"perspective");
289 CHECK (
"UI:?[perspective]-panel.*. /α/β/γ/δ/ε/λ/ον" ==
string(uic));
290 CHECK (
"?[perspective]-panel.*. " == uic.
getComp());
291 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
294 CHECK (
"UI:win[perspective]-panel.*. /α/β/γ/δ/ε/λ/ον" ==
string(uic));
295 CHECK (
"win[perspective]-panel.*. " == uic.
getComp());
296 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
299 CHECK (
"UI:win[*]-panel.*. /α/β/γ/δ/ε/λ/ον" ==
string(uic));
300 CHECK (
"win[*]-panel.*. " == uic.
getComp());
301 CHECK (
"α/β/γ/δ/ε/λ/ον" == uic.
getPath());
302 CHECK (12 == uic.
size());
305 CHECK (
"UI:win[*]-panel.*. / " ==
string(uic));
306 CHECK (
"win[*]-panel.*. " == uic.
getComp());
308 CHECK (6 == uic.
size());
312 uic = uic.
path(
nullptr);
313 CHECK (
"UI:win[*]-panel.*. " ==
string(uic));
314 CHECK (
"win[*]-panel.*. " == uic.
getComp());
316 CHECK (5 == uic.
size());
319 uic = uic.
append(
nullptr);
320 CHECK (
"UI:win[*]-panel.*. " ==
string(uic));
321 CHECK (
"win[*]-panel.*. " == uic.
getComp());
323 CHECK (5 == uic.
size());
326 CHECK (
"UI:win[*]-panel.*. " ==
string(uic));
327 CHECK (
"win[*]-panel.*. " == uic.
getComp());
329 CHECK (5 == uic.
size());
332 CHECK (
"UI:win[*]-panel.*. /**" ==
string(uic));
333 CHECK (
"win[*]-panel.*. " == uic.
getComp());
336 CHECK (6 == uic.
size());
339 CHECK (
"UI:win[*]-panel.*.*/**" ==
string(uic));
340 CHECK (
"win[*]-panel.*.*" == uic.
getComp());
342 CHECK (6 == uic.
size());
345 CHECK (
"UI:win[*]-panel" ==
string(uic));
346 CHECK (
"win[*]-panel" == uic.
getComp());
348 CHECK (3 == uic.
size());
355 UICoord u1 {
"Γ",
"Δ",
"Θ",
"Ξ",
"Σ",
"Ψ",
"Φ" };
356 UICoord u11{
"Γ",
"Δ",
"Θ",
"Ξ",
"Σ",
"Ψ",
"Φ",
"Ω"};
357 UICoord u2 {
"Γ",
"Δ",
"Θ",
"Σ",
"Ξ",
"Ψ",
"Φ",
"Ω"};
367 CHECK (u1 ==
UICoord(
"Γ",
"Δ",
"Θ",
"Ξ",
"Σ",
"Ψ",
"Φ" ));
368 CHECK (u1 ==
UICoord(
"Γ",
"Δ",
"Θ",
"Ξ",
"Σ",
"Ψ",
"Φ",
"" ));
369 CHECK (
UICoord(
"Γ",
"Δ",
"Θ",
"Ξ",
"Σ",
"Ψ",
"Φ",
nullptr) ==
UICoord(
"Γ",
"Δ",
"Θ",
"Ξ",
"Σ",
"Ψ",
"Φ"));
371 CHECK (u11 == u1.path(
"Ψ/Φ/Ω//"));
372 CHECK (u11 != u1.path(
"//Ψ/Φ/Ω"));
378 CHECK (not (u1 < u11));
379 CHECK (not (u1 < u1 ));
380 CHECK (not (u1 < u2 ));
381 CHECK (not (u11 < u2 ));
384 CHECK (u11 < u1.view(
"*").window(
NULL));
392 UICoord u1 {
"",
"",
"",
"Ξ",
"Σ"};
393 UICoord u2 {
"Γ",
"*",
"Θ",
"Ξ",
"Σ"};
394 UICoord u3 {
"Γ",
"Δ",
"Θ",
"Ξ",
"Σ"};
396 CHECK (not u1.isComplete());
397 CHECK (not u1.isExplicit());
399 CHECK ( u2.isComplete());
400 CHECK (not u2.isExplicit());
402 CHECK ( u3.isComplete());
403 CHECK ( u3.isExplicit());
405 CHECK (u1.isIncomplete());
414 CHECK ( u1.isPresent(
UIC_TAB));
416 CHECK (not u1.isPresent(
UIC_PATH+1));
422 CHECK ( u2.isPresent(
UIC_TAB));
424 CHECK (not u2.isPresent(
UIC_PATH+1));
430 CHECK ( u3.isPresent(
UIC_TAB));
432 CHECK (not u3.isPresent(
UIC_PATH+1));
437 CHECK (not u2.isWildcard(
UIC_VIEW));
438 CHECK (not u2.isWildcard(
UIC_TAB));
439 CHECK (not u2.isWildcard(
UIC_PATH));
440 CHECK (not u2.isWildcard(
UIC_PATH+1));
Adapter for building an implementation of the »Lumiera Forward Iterator« concept.
Token or Atom with distinct identity.
Builder && truncateTo(size_t depth)
possibly shorten this path specification to a limited depth
Describe a location within the UI through structural/topological coordinates.
static Builder window(Literal windowID)
Builder: start definition of UI-Coordinates rooted in given window.
Builder tab(Literal tabID) const
Builder path(Literal pathDefinition) const
convenience builder function so set a full path definition
Builder persp(Literal perspectiveID) const
Literal getWindow() const
bool isIncomplete() const
Builder append(Literal elmID) const
Builder prepend(Literal elmID) const
Builder view(Literal viewID) const
void verify_comparisons()
void verify_localPredicates()
Lumiera GTK UI implementation root.
Test runner and basic definitions for tests.
string join(COLL &&coll, string const &delim=", ")
enumerate a collection's contents, separated by delimiter.
bool isnil(lib::time::Duration const &dur)
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
A collection of frequently used helper functions to support unit testing.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
A topological addressing scheme to designate structural locations within the UI.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...