Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Test framework for TCL - Tcltest - some examples

Tcl ships with the tcltest test suite / harness - and standard advice for coding is to write lots of tests and check with them every time you run your code.

There's a (new) first example [here] - loading in Tcltest and defining 3 tests:

  package require tcltest
  
  tcltest::test 001 {Hello test world} {
    expr 7 * 9
  } 63
  
  tcltest::test 002 {A test that will fail} {
    expr 7 * 10
  } 64
  
  tcltest::test 003 {Alternative formatting} \
    -body { expr 7 * 10 } \
    -result {70}


Other examples ...
Using setup and cleanup blocks - [here]
Running all the tests in a dirctory [here]
Running only if certain constraints are met [here]
(written 2015-03-11)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Q456 - Object Orientation and General technical topics - Test Driven Development and Behaviour Driven Development
  [4326] Learning to program - comments, documentation and test code - (2014-11-22)
  [4336] Test Driven Development - a first example of principle in C - (2014-12-01)
  [4346] A behaviour driven example of writing a Java program - (2014-12-09)
  [4374] Test driven development, and class design, from first principles (using C++) - (2014-12-30)
  [4380] Behaviour Driven Development / Ruby and Cucumber - (2015-01-02)
  [4387] Regression Testing my website - Cucumber and Watir - (2015-01-07)
  [4542] The principle of mocking - and the Python Mock package - (2015-10-17)
  [4634] Regression testing - via a very short C testing framework - (2016-01-29)
  [4652] Testing new algorithms in PHP - (2016-02-20)

T249 - Tcl/Tk - The Tcltest Package

Back to
Objects in Tcl - iTcl - updated first steps example
Previous and next
or
Horse's mouth home
Forward to
A new Tcl/tk example - a window to show system status
Some other Articles
Reading from a URL, and reading Json, from your Tcl script
Using Object Oriented Tcl and the Tk toolkit together - real life example
Managing the window size (and layout) in Tcl/Tk
A new Tcl/tk example - a window to show system status
Test framework for TCL - Tcltest - some examples
Objects in Tcl - iTcl - updated first steps example
Working out distance between places, using OS grid references and a program in Tcl
Everything is a string - even a list
Tcl variable names - no real limits!
Binary data handling - Python and Perl
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2021: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/4457_Tes ... mples.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb