Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 94b9fd42d75c08e7becf3dc32b6fe9e7dc8e0a93
Ticket: 513983ffffffffffffffffffffffffffffffffff
invalid calls to [test] should throw errors
User & Date: melissachawla on 2002-02-08 11:27:24
Changes

  1. icomment:
    Logged In: YES 
    user_id=225959
    
    Hi Don,
    It's Melissa Chawla, the (woefully delinquent) maintainer of
    this package!  I'm sorry for not logging in before.  I had
    thought that my email address (which includes my full name)
    would be included in my message, but it wasn't.
    
    As for reading the patches, I didn't, and I'm sorry for
    that.  When I started my message, the patch wasn't uploaded
    yet.  I guess I don't really have much sympathy for folks
    who call the test command with bad args.  You can run
    procheck over your code to catch such problems (I've used a
    tcltest.pcx extention to procheck to achieve this in the
    past).  Although if you're generating your test calls,
    procheck won't help.
    
    I'm all for improving the docs so they fully reflect what
    the code does.
    
    I'm not totally opposed to the last suggestion of having an
    tcltest package option to disallow the test command from
    ever throwing an exception, though I wonder how many other
    people will really use it.  In the mean time, you can
    achieve this by doing something like the following
    (untested) code:
    
    package require tcltest 2.0
    rename ::tcltest::test ::tcltest::test_old
    proc ::tcltest::test {args} {
          if {[catch {eval ::tcltest::test_old $args} result]} {
            puts "bad call to test command with args: $args:
    $::errorInfo"
        }
        return $result
    }
    
    Hopefully this second round of comments is more helpful to
    folks.
    -Melissa
    
    
  2. login: "melissachawla"
  3. mimetype: "text/plain"
  4. username: "melissachawla"