Changeset 560 for trunk/src/tcl/tests


Ignore:
Timestamp:
Dec 14, 2006 9:10:14 AM (17 years ago)
Author:
dkearney
Message:

updated the tcl units.tcl test file to reflect changes in the core units code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tcl/tests/units.test

    r549 r560  
    168168test convert-1.8.0 {Rappture::Units::convert, convert undefined unit} {
    169169    list [catch {Rappture::Units::convert 33Q -to nm } msg] $msg
    170 } {1 {unrecognized units: "Q"}}
     170} {1 {Unrecognized units: "Q".
     171Should be units of type length (A,in,m,nm)}}
    171172
    172173#----------------------------------------------------------
     
    465466test convert_units-5.4.4.2 {Rappture::Units::convert, cm2nZ/Vs->m2/us} {
    466467    list [catch {Rappture::Units::convert 2cm2nZ/Vs -to m2/us} msg] $msg
    467 } {1 {unrecognized units: "cm2nZ/Vs"}}
     468} {1 {Unrecognized units: "cm2nZ/Vs".
     469Should be units of type length/time (/s,/us,A2,in2,m2)}}
    468470
    469471test convert_units-5.4.4.3 {Rappture::Units::convert, cm2/s->m2/kVus} {
    470472    list [catch {Rappture::Units::convert 2cm2/s -to m2/kVus} msg] $msg
    471 } {1 {unmatched units in conversion: (kV-1)}}
     473} {1 {unmatched units in conversion: (kV-1)
     474Please enter units of type length/electric_potential*time (/V,/kV,/s,/us,A2,in2,m2)}}
    472475
    473476test convert_units-5.4.4.4 {Rappture::Units::convert, cm2/s->m2/uskV} {
    474477    list [catch {Rappture::Units::convert 2cm2/s -to m2/uskV} msg] $msg
    475 } {1 {unmatched units in conversion: (kV-1)}}
     478} {1 {unmatched units in conversion: (kV-1)
     479Please enter units of type length/time*electric_potential (/V,/kV,/s,/us,A2,in2,m2)}}
    476480
    477481test convert_units-5.4.4.5 {Rappture::Units::convert, cm2V/s->m2/us} {
    478482    list [catch {Rappture::Units::convert 2cm2V/s -to m2/us} msg] $msg
    479 } {1 {unmatched units in conversion: (V1)}}
     483} {1 {unmatched units in conversion: (V)
     484Please enter units of type length/time (/s,/us,A2,in2,m2)}}
    480485
    481486test convert_units-5.4.4.6 {Rappture::Units::convert, cm2V/s->m2/us} {
    482487    list [catch {Rappture::Units::convert 2cm2V/s -to m2/us} msg] $msg
    483 } {1 {unmatched units in conversion: (V1)}}
     488} {1 {unmatched units in conversion: (V)
     489Please enter units of type length/time (/s,/us,A2,in2,m2)}}
    484490
    485491test convert_units-5.4.4.7 {Rappture::Units::convert, cm2V->m2} {
    486492    list [catch {Rappture::Units::convert 2cm2V -to m2} msg] $msg
    487 } {1 {unmatched units in conversion: (V1)}}
     493} {1 {unmatched units in conversion: (V)
     494Please enter units of type length (A2,in2,m2)}}
    488495
    489496test convert_units-5.4.4.8 {Rappture::Units::convert, Vcm2->m2} {
    490497    list [catch {Rappture::Units::convert 2Vcm2 -to m2} msg] $msg
    491 } {1 {unmatched units in conversion: (V1)}}
     498} {1 {unmatched units in conversion: (V)
     499Please enter units of type length (A2,in2,m2)}}
    492500
    493501test convert_units-5.4.4.9 {Rappture::Units::convert, cm2->Vm2} {
    494502    list [catch {Rappture::Units::convert 2cm2 -to Vm2} msg] $msg
    495 } {1 {unmatched units in conversion: (V1)}}
     503} {1 {unmatched units in conversion: (V)
     504Please enter units of type electric_potential*length (A2,V,in2,m2)}}
    496505
    497506test convert_units-5.4.4.10 {Rappture::Units::convert, cm2->m2V} {
    498507    list [catch {Rappture::Units::convert 2cm2 -to m2V} msg] $msg
    499 } {1 {unmatched units in conversion: (V1)}}
     508} {1 {unmatched units in conversion: (V)
     509Please enter units of type length*electric_potential (A2,V,in2,m2)}}
    500510
    501511test convert_units-5.4.4.11 {Rappture::Units::convert, cm2A->Vm2} {
    502512    list [catch {Rappture::Units::convert 2cm2A -to Vm2} msg] $msg
    503 } {1 {unmatched units in conversion: (A1) -> (V1)}}
     513} {1 {unmatched units in conversion: (A) -> (V)
     514Please enter units of type electric_potential*length (A2,V,in2,m2)}}
    504515
    505516test convert_units-5.4.4.12 {Rappture::Units::convert, cm2A->m2V} {
    506517    list [catch {Rappture::Units::convert 2cm2A -to m2V} msg] $msg
    507 } {1 {conversion unavailable: (A1) -> (V1)}}
     518} {1 {Conversion unavailable: (A) -> (V)
     519Please enter units of type length*electric_potential (A2,V,in2,m2)}}
    508520
    509521test convert_units-5.4.4.13 {Rappture::Units::convert, Acm2->Vm2} {
    510522    list [catch {Rappture::Units::convert 2Acm2 -to Vm2} msg] $msg
    511 } {1 {unmatched units in conversion: (A1) -> (V1)}}
     523} {1 {unmatched units in conversion: (A) -> (V)
     524Please enter units of type electric_potential*length (A2,V,in2,m2)}}
    512525
    513526test convert_units-5.4.4.14 {Rappture::Units::convert, Acm2->m2V} {
    514527    list [catch {Rappture::Units::convert 2Acm2 -to m2V} msg] $msg
    515 } {1 {conversion unavailable: (A1) -> (V1)}}
     528} {1 {Conversion unavailable: (A) -> (V)
     529Please enter units of type length*electric_potential (A2,V,in2,m2)}}
    516530
    517531#--------------------------------------------------------------------
     
    525539test convert_units-5.4.5.1 {Rappture::Units::convert, cm2->/m2} {
    526540    list [catch {Rappture::Units::convert 1cm -to /m2} msg] $msg
    527 } {1 {conversion unavailable: (cm1) -> (m-2)}}
     541} {1 {Conversion unavailable: (cm) -> (m-2)
     542Please enter units of type /length (/A2,/in2,/m2)}}
    528543
    529544#--------------------------------------------------------------------
     
    785800test convert_units-5.4.10.1 {Rappture::Units::convert, torr->mmhg} {
    786801    list [catch {Rappture::Units::convert 5torr -to mmhg} msg] $msg
    787 } {0 5mmhg}
     802} {0 5mmHg}
    788803
    789804test convert_units-5.4.10.2 {Rappture::Units::convert, ToRr->mmhg} {
    790805    list [catch {Rappture::Units::convert 5ToRr -to mmhg} msg] $msg
    791 } {0 5mmhg}
     806} {0 5mmHg}
    792807
    793808test convert_units-5.4.10.3 {Rappture::Units::convert, kpa->PSI} {
    794809    list [catch {Rappture::Units::convert 5kpa -to PSI} msg] $msg
    795 } {0 0.7252PSI}
     810} {0 0.7252psi}
    796811
    797812test convert_units-5.4.10.4 {Rappture::Units::convert, KPA->PsI} {
    798813    list [catch {Rappture::Units::convert 5KPA -to PsI} msg] $msg
    799 } {0 0.7252PsI}
     814} {0 0.7252psi}
    800815
    801816test convert_units-5.4.10.5 {Rappture::Units::convert, Cm2/vS->M2/KVUS} {
    802817    list [catch {Rappture::Units::convert 2Cm2/vS -to M2/KVUS} msg] $msg
    803 } {0 2e-07M2/KVUS}
     818} {0 2e-07m2/kVus}
    804819
    805820#--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.