_acs-templating__util_list_to_lookup (private)

 _acs-templating__util_list_to_lookup

Defined in packages/acs-templating/tcl/test/util-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) aa_true aa_true (public) template::util::list_to_lookup template::util::list_to_lookup (public) _acs-templating__util_list_to_lookup _acs-templating__util_list_to_lookup _acs-templating__util_list_to_lookup->aa_log _acs-templating__util_list_to_lookup->aa_log_result _acs-templating__util_list_to_lookup->aa_true _acs-templating__util_list_to_lookup->template::util::list_to_lookup

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    set values {
        a
        b
        c
        d
        e
        f
        g
    }
    template::util::list_to_lookup $values lookup

    set e {![info exists lookup(z)]}
    aa_true "Element 'z' is not found in the lookup" $e

    for {set i 1} {$i <= 7} {incr i} {
        set e {$lookup([lindex $values $i-1]) == $i}
        aa_true "Element '[lindex $values $i-1]' is at position '$i' of the lookup" $e
    }
}} {
          aa_log "Running testcase body $body_count"
          set ::__aa_test_indent [info level]
          set catch_val [catch $testcase_body msg]
          if {$catch_val != 0 && $catch_val != 2} {
              aa_log_result "fail" "util_list_to_lookup (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: