Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Started on testsuite for validation types. Template for the common API signatures. |
---|---|
Timelines: | family | ancestors | descendants | both | vtype-testing |
Files: | files | file ages | folders |
SHA1: |
52969c8c6f9c505fda554d8776e9d2b2 |
User & Date: | andreask 2015-05-09 00:08:29.164 |
Context
2015-05-11
| ||
22:21 | Testing validation types, continued. check-in: 58cb0c6af7 user: aku tags: vtype-testing | |
2015-05-09
| ||
00:08 | Started on testsuite for validation types. Template for the common API signatures. check-in: 52969c8c6f user: andreask tags: vtype-testing | |
00:06 | Comment fixes check-in: ebdf8cc004 user: andreask tags: trunk | |
Changes
Added tests/v_boolean.test.
> > > > > > > > > > > > > > > > > > > > > > > > > | 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 | # -*- tcl -*- tcl.tk//DSL tcltest//EN//2.0 # # ## ### ##### ######## ############# ##################### ## Testing the cmdr::validate package (sub: boolean). kt check Tcl 8.5 kt check tcltest 2 kt require support debug kt require support debug::caller kt local support cmdr::validate::common kt local testing cmdr::validate # # ## ### ##### ######## ############# ##################### ## Basic API. set vtype cmdr::validate::boolean kt source vtype.tcl # # ## ### ##### ######## ############# ##################### ## Specific behaviour # # ## ### ##### ######## ############# ##################### cleanupTests return |
Added tests/vtype.tcl.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | # -*- tcl -*- tcl.tk//DSL tcltest--template//EN//2.0 # # ## ### ##### ######## ############# ##################### ## Testing a validation type. # Sourced from the actual .test file and parameterized with the main # ensemble command of the validation type. This file only tests the # standard part of the API for the type, i.e. the command # signatures. The actual validation, completion, etc. must be tested # by the caller, as that changes from type to type. # # File API variables # # - "vtype" - command for the validation type. # - "vtparm" - name of the parameter variable used by all VT API commands. # - "vtval" - name of the value variable used by the all VT API commands except "default". # # The last two can be left unspecified, and will default to "p" and "x", respectively. if {![info exists vtparm]} { set vtparm p } if {![info exists vtval]} { set vtval x } if {![info exists vtype]} { # TODO: kt ... - Abort testsuite } # # ## ### ##### ######## ############# ##################### ## default test vt-${vtype}-default-1.0 "$vtype default, wrong args, not enough" -body { $vtype default } -returnCodes error -result "wrong # args: should be \"$vtype default $vtparm\"" test vt-${vtype}-default-1.1 "$vtype default, wrong args, too many" -body { $vtype default P X } -returnCodes error -result "wrong # args: should be \"$vtype default $vtparm\"" # # ## ### ##### ######## ############# ##################### ## validate test vt-${vtype}-validate-1.0 "$vtype validate, wrong args, not enough" -body { $vtype validate } -returnCodes error -result "wrong # args: should be \"$vtype validate $vtparm $vtval\"" test vt-${vtype}-validate-1.1 "$vtype validate, wrong args, not enough" -body { $vtype validate P } -returnCodes error -result "wrong # args: should be \"$vtype validate $vtparm $vtval\"" test vt-${vtype}-validate-1.2 "$vtype validate, wrong args, too many" -body { $vtype validate P V X } -returnCodes error -result "wrong # args: should be \"$vtype validate $vtparm $vtval\"" # # ## ### ##### ######## ############# ##################### ## complete test vt-${vtype}-complete-1.0 "$vtype complete, wrong args, not enough" -body { $vtype complete } -returnCodes error -result "wrong # args: should be \"$vtype complete $vtparm $vtval\"" test vt-${vtype}-complete-1.1 "$vtype complete, wrong args, not enough" -body { $vtype complete P } -returnCodes error -result "wrong # args: should be \"$vtype complete $vtparm $vtval\"" test vt-${vtype}-complete-1.2 "$vtype complete, wrong args, too many" -body { $vtype complete P V X } -returnCodes error -result "wrong # args: should be \"$vtype complete $vtparm $vtval\"" # # ## ### ##### ######## ############# ##################### ## release test vt-${vtype}-release-1.0 "$vtype release, wrong args, not enough" -body { $vtype release } -returnCodes error -result "wrong # args: should be \"$vtype release $vtparm $vtval\"" test vt-${vtype}-release-1.1 "$vtype release, wrong args, not enough" -body { $vtype release P } -returnCodes error -result "wrong # args: should be \"$vtype release $vtparm $vtval\"" test vt-${vtype}-release-1.2 "$vtype release, wrong args, too many" -body { $vtype release P V X } -returnCodes error -result "wrong # args: should be \"$vtype release $vtparm $vtval\"" # # ## ### ##### ######## ############# ##################### ## return |