_acs-api-browser__callgraph__bad_library_calls (private)
_acs-api-browser__callgraph__bad_library_calls
Defined in packages/acs-api-browser/tcl/test/acs-api-browser-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 {{ # Fetch service-contract procs to exclude them from the check # when they are called from within the acs-service-contract # package. foreach alias [db_list get_sc_aliases { select distinct impl_alias from acs_sc_impl_aliases }] { set sc_aliases($alias) 1 } foreach caller [lsort -dictionary [nsv_array names api_proc_doc]] { #set caller db_transaction set called_procs [api_called_proc_names -proc_name $caller] set caller_deprecated_p [apidoc::get_doc_property $caller deprecated_p 0] set caller_package_key [apidoc::get_doc_property $caller package_key ""] foreach called $called_procs { #ns_log notice "$caller calls $called" set msg "proc $caller calls deprecated proc: $called" if {[apidoc::get_doc_property $called deprecated_p 0]} { if {$caller_deprecated_p} { aa_log_result warning "deprecated $msg" } else { aa_error "$msg<br> <small><code>[apidoc::get_doc_property $caller script]</code></small><br> <small><code>[apidoc::get_doc_property $called script]</code></small>" } } set package_key [apidoc::get_doc_property $called package_key ""] if {$caller_package_key ne "" && $package_key ne "" && $caller_package_key ne $package_key } { # It is fine for acs-service-contract to invoke # contract implementations. if {$caller_package_key eq "acs-service-contract" && [info exists sc_aliases($called)]} { continue } if {[apidoc::get_doc_property $called protection public] eq "private" && ![string match AcsSc.* $caller] } { set msg "proc $caller_package_key.$caller calls private $package_key.$called" if {$caller_deprecated_p} { aa_log_result warning "deprecated $msg" } else { aa_error "$msg<br> <small><code>[apidoc::get_doc_property $caller script]</code></small><br> <small><code>[apidoc::get_doc_property $called script]</code></small>" } } } } } }} { 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" "callgraph__bad_library_calls (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle