Changeset 1740


Ignore:
Timestamp:
May 25, 2010 12:40:03 PM (14 years ago)
Author:
dkearney
Message:

making kelvin and celcius metric units, adding unit tests for the change

Location:
trunk
Files:
2 edited

Legend:

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

    r1427 r1740  
    659659} {0 538.47R}
    660660
     661test convert_units-5.4.6.12 {Rappture::Units::convert, K->mK} {
     662    list [catch {Rappture::Units::convert 299.15K -to mK} msg] $msg
     663} {0 299150mK}
     664
     665test convert_units-5.4.6.13 {Rappture::Units::convert, K->mk} {
     666    list [catch {Rappture::Units::convert 299.15K -to mk} msg] $msg
     667} {0 299150mK}
     668
     669test convert_units-5.4.6.14 {Rappture::Units::convert, C->mC} {
     670    list [catch {Rappture::Units::convert 100C -to mC} msg] $msg
     671} {0 100000mC}
     672
     673test convert_units-5.4.6.15 {Rappture::Units::convert, C->mc} {
     674    list [catch {Rappture::Units::convert 100C -to mc} msg] $msg
     675} {0 100000mC}
     676
     677
    661678#--------------------------------------------------------------------
    662679# Energy Conversions
  • trunk/src/core/RpUnits.cc

    r1571 r1740  
    25902590
    25912591    fahrenheit = RpUnits::define("F", NULL, RP_TYPE_TEMP);
    2592     celcius    = RpUnits::define("C", NULL, RP_TYPE_TEMP);
    2593     kelvin     = RpUnits::define("K", NULL, RP_TYPE_TEMP);
     2592    celcius    = RpUnits::define("C", NULL, RP_TYPE_TEMP, RPUNITS_METRIC);
     2593    kelvin     = RpUnits::define("K", NULL, RP_TYPE_TEMP,RPUNITS_METRIC);
    25942594    rankine    = RpUnits::define("R", NULL, RP_TYPE_TEMP);
    25952595
Note: See TracChangeset for help on using the changeset viewer.