_acs-tcl__string_length_compare (private)

 _acs-tcl__string_length_compare

Defined in packages/acs-tcl/tcl/test/utilities-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_equals aa_equals (public) aa_log aa_log (public) aa_log_result aa_log_result (public) util::string_length_compare util::string_length_compare (public) _acs-tcl__string_length_compare _acs-tcl__string_length_compare _acs-tcl__string_length_compare->aa_equals _acs-tcl__string_length_compare->aa_log _acs-tcl__string_length_compare->aa_log_result _acs-tcl__string_length_compare->util::string_length_compare

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    #
    # Equal length
    #
    set strings {
        test1 test1
        "test 2" test-2
        test-3 test-3
        "test 4 is actually pretty long" "test-4-is-actually-pretty-long"
        "TEST 5" "test-5"
        "TeSt 6" "test-6"
        "" ""
    }
    dict for {s1 s2} $strings {
        aa_equals "Strings $s1 and $s2" [util::string_length_compare $s1 $s2] 0
    }
    #
    # s1 longer than s2
    #
    set strings {
        test1asdf test1
        "test 2 asdfs " test-2
        test-3- test-3
        "test 4 is actually pretty long !" "test-4-is-actually-pretty-long"
        "TEST 5asd " "test-5"
        "TeSt 6 asd" "test-6"
        " " ""
    }
    dict for {s1 s2} $strings {
        aa_equals "Strings $s1 and $s2" [util::string_length_compare $s1 $s2] 1
    }
    #
    # s2 longer than s1
    #
    set strings {
        test1 test1asdf
        "test 2" test-2sdf
        test-3 test-3ssas
        "test 4 is actually pretty long" "test-4-is-actually-pretty-long-sadfas"
        "TEST 5" "test-5   "
        "TeSt 6" "test-6 sadfsda"
        "" " "
    }
    dict for {s1 s2} $strings {
        aa_equals "Strings $s1 and $s2" [util::string_length_compare $s1 $s2] -1
    }
}} {
          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" "string_length_compare (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: