_acs-tcl__cross_package_called_private_functions (private)
_acs-tcl__cross_package_called_private_functions
Defined in packages/acs-tcl/tcl/test/doc-check-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ set count 0 set fails 0 set private 0 foreach called [lsort -dictionary [nsv_array names api_proc_doc]] { incr count set called_by_count 0 set called_info [nsv_get api_proc_doc $called] if {[dict exists $called_info calledby] && [dict exists $called_info script] && [dict exists $called_info protection] && [dict get $called_info protection] eq "private" } { incr private regexp {^packages/([^/]+)/} [dict get $called_info script] . called_package_key foreach caller [lsort [dict get $called_info calledby]] { incr called_by_count if {[nsv_get api_proc_doc $caller caller_info] && [dict exists $caller_info script] && ![string match "AcsSc.*" $caller] } { regexp {^packages/([^/]+)/} [dict get $caller_info script] . caller_package_key if {$caller_package_key ne $called_package_key} { incr fails set msg "" append msg "private function <$called_package_key $called> " "called by <$caller_package_key $caller><br>" [dict get $called_info script] "<br>" [dict get $caller_info script] aa_log_result fail $msg } } } ns_log notice "private function $called called by $called_by_count functions" } } aa_log "Found $fails cross-package private calls out of a total of $private private calls (total: $count call sites)" }} { 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" "cross_package_called_private_functions (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle