os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/winNotify.test
First public contribution.
1 # This file tests the tclWinNotify.c file.
3 # This file contains a collection of tests for one or more of the Tcl
4 # built-in commands. Sourcing this file into Tcl runs the tests and
5 # generates output for errors. No output means no errors were found.
7 # Copyright (c) 1997 by Sun Microsystems, Inc.
8 # Copyright (c) 1998-1999 by Scriptics Corporation.
10 # See the file "license.terms" for information on usage and redistribution
11 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 # RCS: @(#) $Id: winNotify.test,v 1.7 2000/04/10 17:19:06 ericm Exp $
15 if {[lsearch [namespace children] ::tcltest] == -1} {
16 package require tcltest
17 namespace import -force ::tcltest::*
20 set ::tcltest::testConstraints(testeventloop) \
21 [expr {[info commands testeventloop] != {}}]
23 # There is no explicit test for InitNotifier or NotifierExitHandler
25 test winNotify-1.1 {Tcl_SetTimer: positive timeout} {pcOnly} {
27 after 1000 { set done 1 }
31 test winNotify-1.2 {Tcl_SetTimer: positive timeout, message pending} {pcOnly} {
34 set a1 [after 0 { incr y }]
40 test winNotify-1.3 {Tcl_SetTimer: cancelling positive timeout} {pcOnly} {
43 set id [after 10000 { incr y }]
49 test winNotify-1.4 {Tcl_SetTimer: null timeout, message pending} {pcOnly} {
58 test winNotify-2.1 {Tcl_ResetIdleTimer} {pcOnly} {
65 test winNotify-2.2 {Tcl_ResetIdleTimer: message pending} {pcOnly} {
75 test winNotify-3.1 {NotifierProc: non-modal normal timer} {pcOnly testeventloop} {
78 foreach i [after info] {
81 after 500 { incr x; testeventloop done }
85 test winNotify-3.2 {NotifierProc: non-modal normal timer, rescheduled} {pcOnly testeventloop} {
88 foreach i [after info] {
91 after 500 { incr x; after 100 {incr x; testeventloop done }}
95 test winNotify-3.3 {NotifierProc: modal normal timer} {pcOnly} {
98 foreach i [after info] {
105 test winNotify-3.4 {NotifierProc: modal normal timer, rescheduled} {pcOnly} {
108 foreach i [after info] {
112 after 500 { incr y; after 100 {incr x}}
116 test winNotify-3.5 {NotifierProc: non-modal idle timer} {pcOnly testeventloop} {
119 foreach i [after info] {
122 after idle { incr x; testeventloop done }
126 test winNotify-3.6 {NotifierProc: non-modal idle timer, rescheduled} {pcOnly testeventloop} {
129 foreach i [after info] {
132 after idle { incr x; after idle {incr x; testeventloop done }}
136 test winNotify-3.7 {NotifierProc: modal idle timer} {pcOnly} {
139 foreach i [after info] {
142 after idle { incr x }
146 test winNotify-3.8 {NotifierProc: modal idle timer, rescheduled} {pcOnly} {
149 foreach i [after info] {
153 after idle { incr y; after idle {incr x}}
158 # Tcl_DoOneEvent is tested by the timer.test, io.test, and event.test files
161 ::tcltest::cleanupTests