home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / SunLabs / tclTK / src / tcl7.4 / tests / dcall.test < prev    next >
Encoding:
Text File  |  1994-12-18  |  1.2 KB  |  41 lines

  1. # Commands covered:  none
  2. #
  3. # This file contains a collection of tests for Tcl_CallWhenDeleted.
  4. # Sourcing this file into Tcl runs the tests and generates output for
  5. # errors.  No output means no errors were found.
  6. #
  7. # Copyright (c) 1993 The Regents of the University of California.
  8. # Copyright (c) 1994 Sun Microsystems, Inc.
  9. #
  10. # See the file "license.terms" for information on usage and redistribution
  11. # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  12. #
  13. # @(#) dcall.test 1.4 94/12/17 16:19:48
  14.  
  15. if {[info commands testdcall] == {}} {
  16.     puts "This application hasn't been compiled with the \"testdcall\""
  17.     puts "command, so I can't test Tcl_CallWhenDeleted."
  18.     return
  19. }
  20.  
  21. if {[string compare test [info procs test]] == 1} then {source defs}
  22.  
  23. test dcall-1.1 {deletion callbacks} {
  24.     testdcall 1 2 3
  25. } {1 2 3}
  26. test dcall-1.2 {deletion callbacks} {
  27.     testdcall
  28. } {}
  29. test dcall-1.3 {deletion callbacks} {
  30.     testdcall 20 21 22 -22
  31. } {20 21}
  32. test dcall-1.4 {deletion callbacks} {
  33.     testdcall 20 21 22 -20
  34. } {21 22}
  35. test dcall-1.5 {deletion callbacks} {
  36.     testdcall 20 21 22 -21
  37. } {20 22}
  38. test dcall-1.6 {deletion callbacks} {
  39.     testdcall 20 21 22 -21 -22 -20
  40. } {}
  41.