Overview
| Artifact ID: | dd18cc78f24f9e0fc132b5c037b9efcb290ada20 |
|---|---|
| Ticket: | 512214ffffffffffffffffffffffffffffffffff
allow skipping of constraint init code |
| User & Date: | dgp on 2002-06-06 22:21:21 |
Changes
- icomment:
Logged In: YES user_id=80530 Here's a patch that converts tcltest to do "lazy" initialization of test constraints. The value of a built-in constraint is not determined unless/until a [test] command that depends on that constraint is evaluated. This should address the problem. The patch also deprecates the [initConstraintsHook] because contraints are no longer initialized at package load time by default. For compatibility, if an [initConstraintsHook] has been defined, tcltest reverts to the old behavior of initialization of constraints at package load time. This should be discouraged. The hook is completely unnecessary; any tcltest user that wants to add a constraint can do so directly by calling the [testConstraint] command. No need for a hook at all. This patch also cleans up the mess that was the [limitConstraints] command. Some comments/documentation indicated this command took a boolean value; some that it took a list value. The existing code/tests did not appear to do anything sensible. I replaced the whole things with a consistent command that accepts a boolean value indicating whether or not to limit running of [test]s to those with constraints specified by the "-constraints" command line option. committing to tcltest 2.1 (Tcl 8.4a5)
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"