• Publicity: Public Only All

xotcl-avail-procs.tcl

Test the availability of xotcl

Location:
packages/xotcl-core/tcl/test/xotcl-avail-procs.tcl

Procedures in this file

Detailed information

_xotcl-core__check_xotcl (private)

 _xotcl-core__check_xotcl

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) _xotcl-core__check_xotcl _xotcl-core__check_xotcl _xotcl-core__check_xotcl->aa_log _xotcl-core__check_xotcl->aa_log_result _xotcl-core__check_xotcl->aa_true

Testcases:
No testcase defined.
[ hide source ] | [ make this the default ]

Content File Source

ad_library {
    Test the availability of xotcl
}


aa_register_case -cats {api smoke} check_xotcl {
    Basic test of the availability of xotcl
} {
  proc ? {cmd expected {msg ""}} {
   set r [uplevel $cmd]
   if {$msg eq ""} {set msg $cmd}
   aa_true $msg {$r eq $expected}
   #if {$r ne $expected} {
   #  test errmsg "$msg returned '$r' ne '$expected'"
   #} else {
   #  test okmsg "$msg - passed ([t1 diff] ms)"
   #}
 }

  ? {expr {$::xotcl::version < 1.5}} 0 "XOTcl Version $::xotcl::version >= 1.5"

  ? {expr {$::tcl_version < 8.5}} 0 "Tcl Version $::tcl_version >= 8.5.4"
  if {[regexp {8[.]5[.]([0-9]+)$} $::tcl_patchLevel _ minor]} {
    ? {expr {$minor < 4}} 0 "Tcl Version $::tcl_patchLevel >= 8.5.4"
  }

  set ns_cache_version_old [catch {ns_cache names util_memoize xxx}]
  if {$ns_cache_version_old} {
    ? {set x old} new "upgrade ns_cache: cvs -z3 -d:pserver:anonymous@aolserver.cvs.sourceforge.net:/cvsroot/aolserver co nscache"
  } else {
    ? {set x new} new "ns_cache version seems sufficiently up to date"
  }

  ? {expr {[::xotcl::Object info methods serialize] ne ""}} 1 "Serialize method available"

  set errorMsg ""
  if {[catch {Serializer all} errorMsg]} {
    aa_true "Serializer not avalilable $errorMsg" 0
  } else {
    aa_true "Serializer avalilable" 1
  }

}

# Local variables:
#    mode: tcl
#    tcl-indent-level: 2
#    indent-tabs-mode: nil
# End: