Changeset 1427 for trunk/lang/tcl


Ignore:
Timestamp:
Apr 29, 2009, 10:02:27 AM (15 years ago)
Author:
dkearney
Message:

adding tesla, gauss, weber and maxwell magnetic field units.
noticed python bindings do not validate the to_units before converting,
o stuff like mM-3 is not converted to /mm3 when given back to the user.
this is a minor bug right now.

File:
1 edited

Legend:

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

    r1157 r1427  
    884884
    885885#--------------------------------------------------------------------
     886# Magnetic Field Conversions
     887#--------------------------------------------------------------------
     888
     889test convert_units-5.4.11.0 {Rappture::Units::convert, T->G} {
     890    list [catch {Rappture::Units::convert 5T -to G} msg] $msg
     891} {0 50000G}
     892
     893test convert_units-5.4.11.1 {Rappture::Units::convert, G->T} {
     894    list [catch {Rappture::Units::convert 5G -to T} msg] $msg
     895} {0 0.0005T}
     896
     897test convert_units-5.4.11.2 {Rappture::Units::convert, G->mT} {
     898    list [catch {Rappture::Units::convert 50G -to mT} msg] $msg
     899} {0 5mT}
     900
     901test convert_units-5.4.11.3 {Rappture::Units::convert, Mx->Wb} {
     902    list [catch {Rappture::Units::convert 5Mx -to Wb} msg] $msg
     903} {0 5e-08Wb}
     904
     905test convert_units-5.4.11.4 {Rappture::Units::convert, Wb->Mx} {
     906    list [catch {Rappture::Units::convert 5e-8Wb -to Mx} msg] $msg
     907} {0 5Mx}
     908
     909test convert_units-5.4.11.5 {Rappture::Units::convert, wB->mX} {
     910    list [catch {Rappture::Units::convert 5e-8wB -to mX} msg] $msg
     911} {0 5Mx}
     912
     913#--------------------------------------------------------------------
    886914# Rappture::Units::Search::for <units>
    887915#--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.