Changeset 545 for trunk/src/tcl


Ignore:
Timestamp:
Nov 19, 2006, 6:12:50 PM (18 years ago)
Author:
dkearney
Message:

updated tests for case insensitive units replaced ff tests with xx because ff is recognized as lowecase F (fahrenheit)

File:
1 edited

Legend:

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

    r537 r545  
    7878test convert-1.3.2.2 {Rappture::Units::convert, -context invalid} {
    7979# this test passes for new tcl bindings, fails for old tcl version
    80     list [catch {Rappture::Units::convert 5m -context ff} msg] $msg
    81 } {1 {bad value "ff": should be a recognized unit for Rappture}}
     80    list [catch {Rappture::Units::convert 5m -context xx} msg] $msg
     81} {1 {bad value "xx": should be a recognized unit for Rappture}}
    8282
    8383test convert-1.4.0 {Rappture::Units::convert, -to blank} {
     
    102102test convert-1.4.2.2 {Rappture::Units::convert, -to invalid} {
    103103# this test passes for new tcl bindings, fails for old tcl version
    104     list [catch {Rappture::Units::convert 5m -to ff} msg] $msg
    105 } {1 {bad value "ff": should be a recognized unit for Rappture}}
     104    list [catch {Rappture::Units::convert 5m -to xx} msg] $msg
     105} {1 {bad value "xx": should be a recognized unit for Rappture}}
    106106
    107107#test convert-1.5.0 {Rappture::Units::convert, -units blank} {
     
    778778} {0 5mmHg}
    779779
    780 
    781 
     780#--------------------------------------------------------------------
     781# Case Insensitive/Sensitive Unit Conversions
     782#--------------------------------------------------------------------
     783
     784test convert_units-5.4.10.1 {Rappture::Units::convert, torr->mmhg} {
     785    list [catch {Rappture::Units::convert 5torr -to mmhg} msg] $msg
     786} {0 5mmhg}
     787
     788test convert_units-5.4.10.2 {Rappture::Units::convert, ToRr->mmhg} {
     789    list [catch {Rappture::Units::convert 5ToRr -to mmhg} msg] $msg
     790} {0 5mmhg}
     791
     792test convert_units-5.4.10.3 {Rappture::Units::convert, kpa->PSI} {
     793    list [catch {Rappture::Units::convert 5kpa -to PSI} msg] $msg
     794} {0 0.7252PSI}
     795
     796test convert_units-5.4.10.4 {Rappture::Units::convert, KPA->PsI} {
     797    list [catch {Rappture::Units::convert 5KPA -to PsI} msg] $msg
     798} {0 0.7252PsI}
     799
     800test convert_units-5.4.10.5 {Rappture::Units::convert, Cm2/vS->M2/KVUS} {
     801    list [catch {Rappture::Units::convert 2Cm2/vS -to M2/KVUS} msg] $msg
     802} {0 2e-07M2/KVUS}
    782803
    783804
Note: See TracChangeset for help on using the changeset viewer.