::xounit::test
Class ErrorTest

Heritage:
::xotcl::Object
  |
  +--::xox::Node
        |
        +--::xounit::Test
              |
              +--::xounit::Assert
                    |
                    +--::xounit::TestCase
Class ErrorTest
superclass ::xounit::TestCase,

Variables
NameDefault ValueClassComment
currentTestMethod    ::xounit::TestCase
 name of the currently running test method.
nodeName    ::xox::Node
 
result    ::xounit::TestCase
 the result for the current run.
 
Methods
NameComment
testErrorInAssert {}  
   
Methods from ::xotcl::Object
#, ., ?, ?code, ?methods, ?object, abstract, copy, coverageFilter, defaultmethod, extractConfigureArg, filterappend, garbageCollect, get#, getClean#, hasclass, init, methodTag, mixinappend, move, profileFilter, self, setParameterDefaults, shell, tclcmd, traceFilter,
 
Instproc Detail

testErrorInAssert

Description:
 
Code:
  ::xounit::test::ErrorTest instproc testErrorInAssert {}  {
   

        catch {

            xotcl::my assert{ [ error "ERROR" ] } { This failure is expected }

            puts "ErrorTest::testErrorInAssert FAILED!"

            exit 1

        } result

        xotcl::my assertEquals "$result"  "ERROR"  { Did not catch the right error }
    
}