source: trunk/src/tcl/tests/units.test @ 568

Last change on this file since 568 was 568, checked in by dkearney, 17 years ago

reworking of the Rappture Units code.
Rappture Units no longer creates an object for each metric extension of every
metric unit. Now the metric prefixes are kept in the dictionary as unit objects,
and when a unit is parsed out of the string received from the user, the unit
is checked to see if it acccepts metric prefixes, if so, a search is done for
the prefix. This allows Rappture Units code to more easily tackle case insensitive
unit name searches. Eventually the prefixes will be removed as direct Rappture Units objects and be turned into (possibly a derived object) rappture units prefix objects.

The find function of the core Rappture Units code now accepts
a "hints" function pointer. The function pointer is executed by the dictionary when
the dictionary thinks it found a matching object. This allows the user of the
dictionary to insert different objects with the same key. For Rappture Units,
multiple units objects with the same key can be inserted into the dictionary.
This is important for units like "A" which could stand for angstroms or amperes.

Additionally, the "make metric" functions were removed because the idea of being a
metric unit has been reduced to a flag inside the Rappture Units object and some
newly added logic. The role of setting the metric flag has been added to the define()
function as an additional function input. The fortran and c code has been updated to
reflect the removal of the function. No updates were made to the define function in
the fortran and c code.

The units.test file was also updated with new tests. Old tests were updated, removing
derived units from the list of compatible units. When searching for micro-meters (um),
compatible units of (A,in,m) will be provided instead of (A,in,m,um).

File size: 39.4 KB
Line 
1# Commands covered:
2#   Rappture::Units::convert
3#   Rappture::Units::description
4#   Rappture::Units::System::for
5#   Rappture::Units::System::all
6#   Rappture::Units::Search::for
7#
8# This file contains a collection of tests for one of the Rappture Tcl
9# commands.  Sourcing this file into Tcl runs the tests and
10# generates output for errors.  No output means no errors were found.
11#
12# ======================================================================
13# AUTHOR:  Derrick Kearney, Purdue University
14# Copyright (c) 2004-2006  Purdue Research Foundation
15#
16# See the file "license.terms" for information on usage and redistribution
17# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
18
19
20if {[lsearch [namespace children] ::tcltest] == -1} {
21    package require tcltest
22    package require Rappture
23    namespace import -force ::tcltest::*
24}
25catch {unset lib}
26
27proc check {var size} {
28    set l [llength $var]
29    if {$l != $size} {
30        return "length mismatch: should have been $size, was $l"
31    }
32    for {set i 0} {$i < $size} {set i [expr $i+1]} {
33        set j [lindex $var $i]
34        if {$j != "item $i"} {
35            return "element $i should have been \"item $i\", was \"$j\""
36        }
37    }
38    return ok
39}
40
41#----------------------------------------------------------
42#----------------------------------------------------------
43# convert command
44# Rappture::Units::convert <value> ?-context? ?-to units? ?-units on/off?
45#----------------------------------------------------------
46test convert-1.0.1 {Rappture::Units::convert, 0 arguments} {
47    list [catch {Rappture::Units::convert} msg] $msg
48} {1 {wrong # args: should be "Rappture::Units::convert <value> ?-context units? ?-to units? ?-units on/off?"}}
49
50test convert-1.1.1 {Rappture::Units::convert, 1 invalid argument} {
51    list [catch {Rappture::Units::convert re} msg] $msg
52} {1 {bad value "re": should be a real number with units}}
53
54test convert-1.1.2 {Rappture::Units::convert, invalid value, valid context} {
55    list [catch {Rappture::Units::convert re -context mm} msg] $msg
56} {1 {bad value "re": should be a real number with units of (A,in,m)}}
57
58test convert-1.1.3 {Rappture::Units::convert, 1 valid argument} {
59    list [catch {Rappture::Units::convert 5} msg] $msg
60} {1 {value: "5" has unrecognized units}}
61
62test convert-1.2.0 {Rappture::Units::convert, 1 valid argument w/ units} {
63    list [catch {Rappture::Units::convert 5m} msg] $msg
64} {0 5m}
65
66test convert-1.3.0 {Rappture::Units::convert, -context blank} {
67    list [catch {Rappture::Units::convert 5m -context} msg] $msg
68} {0 5m}
69
70test convert-1.3.1 {Rappture::Units::convert, -context valid} {
71    list [catch {Rappture::Units::convert 5m -context m} msg] $msg
72} {0 5m}
73
74#test convert-1.3.2.1 {Rappture::Units::convert, -context invalid} {
75## this test passes for old tcl version, fails for new tcl bindings
76#    list [catch {Rappture::Units::convert 5m -context ff} msg] $msg
77#} {0 5m}
78
79test convert-1.3.2.2 {Rappture::Units::convert, -context invalid} {
80# this test passes for new tcl bindings, fails for old tcl version
81    list [catch {Rappture::Units::convert 5m -context xx} msg] $msg
82} {1 {bad value "xx": should be a recognized unit for Rappture}}
83
84test convert-1.4.0 {Rappture::Units::convert, -to blank} {
85    list [catch {Rappture::Units::convert 5m -to} msg] $msg
86} {0 5m}
87
88#test convert-1.4.1.1 {Rappture::Units::convert, -to valid} {
89## this test passes for old tcl version, fails for new tcl bindings
90#    list [catch {Rappture::Units::convert 5m -to A} msg] $msg
91#} {0 50000000000A}
92
93test convert-1.4.1.2 {Rappture::Units::convert, -to valid} {
94# this test passes for new tcl bindings, fails for old tcl version
95    list [catch {Rappture::Units::convert 5m -to A} msg] $msg
96} {0 5e+10A}
97
98#test convert-1.4.2.1 {Rappture::Units::convert, -to invalid} {
99## this test passes for old tcl version, fails for new tcl bindings
100#    list [catch {Rappture::Units::convert 5m -to ff} msg] $msg
101#} {1 {invalid command name ""}}
102
103test convert-1.4.2.2 {Rappture::Units::convert, -to invalid} {
104# this test passes for new tcl bindings, fails for old tcl version
105    list [catch {Rappture::Units::convert 5m -to xx} msg] $msg
106} {1 {bad value "xx": should be a recognized unit for Rappture}}
107
108#test convert-1.5.0 {Rappture::Units::convert, -units blank} {
109## this test passes for old tcl version, fails for new tcl bindings
110#    list [catch {Rappture::Units::convert 5m -units} msg] $msg
111#} {1 {expected boolean value but got ""}}
112
113test convert-1.5.0 {Rappture::Units::convert, -units blank} {
114# this test passes for new tcl bindings, fails for old tcl version
115    list [catch {Rappture::Units::convert 5m -units} msg] $msg
116} {1 {expected boolean value but got ""}}
117
118test convert-1.5.1 {Rappture::Units::convert, -units on} {
119    list [catch {Rappture::Units::convert 5m -units on} msg] $msg
120} {0 5m}
121
122#test convert-1.5.2.1 {Rappture::Units::convert, -units off} {
123## this test passes for old tcl version, fails for new tcl bindings
124## comments for the Rappture::Units::convert function specify that
125## If the -to system is not specified, then the value is converted to
126## fundamental units for the current system. but the code just returns
127## the value, as specified by lines 115-118 or units.tcl 20060414
128#    list [catch {Rappture::Units::convert 5m -units off} msg] $msg
129#} {0 5m}
130
131test convert-1.5.2.2 {Rappture::Units::convert, -units off} {
132# this test passes for new tcl bindings, fails for old tcl version
133    list [catch {Rappture::Units::convert 5m -units off} msg] $msg
134} {0 5}
135
136test convert-1.5.3 {Rappture::Units::convert, -units invalid} {
137# this test passes for new tcl bindings, fails for old tcl version
138# because tcl version makes -units depend of -to flag being populated.
139    list [catch {Rappture::Units::convert 5m -units sdfsd} msg] $msg
140} {1 {expected boolean value but got "sdfsd"}}
141
142#test convert-1.6.0.1 {Rappture::Units::convert, all flags, all valid} {
143## this test passes for old tcl version, fails for new tcl bindings
144## new bindings return scientific notation.
145#    list [catch {Rappture::Units::convert 5m -context m -to A -units off} msg] $msg
146#} {0 50000000000}
147
148test convert-1.6.0.2 {Rappture::Units::convert, all flags, all valid} {
149# this test passes for new tcl bindings, fails for old tcl version
150    list [catch {Rappture::Units::convert 5m -context m -to A -units off} msg] $msg
151} {0 5e+10}
152
153test convert-1.7.0 {Rappture::Units::convert, val w/o units} {
154# this test passes for new tcl bindings, fails for old tcl version
155    list [catch {Rappture::Units::convert 5 -context m} msg] $msg
156} {0 5m}
157
158#test convert-1.7.1.1 {Rappture::Units::convert, invalid val w/ -context} {
159## this test passes for old tcl version, fails for new tcl bindings
160#    list [catch {Rappture::Units::convert de -context m } msg] $msg
161#} {1 {bad value "de": should be a real number with units of (m,A)}}
162
163test convert-1.7.1.2 {Rappture::Units::convert, invalid val w/ -context} {
164# this test passes for new tcl bindings, fails for old tcl version
165    list [catch {Rappture::Units::convert de -context m } msg] $msg
166} {1 {bad value "de": should be a real number with units of (A,in,m)}}
167
168test convert-1.8.0 {Rappture::Units::convert, convert undefined unit} {
169    list [catch {Rappture::Units::convert 33Q -to nm } msg] $msg
170} {1 {Unrecognized units: "Q".
171Should be units of type length (A,in,m)}}
172
173#----------------------------------------------------------
174#----------------------------------------------------------
175# description command
176# Rappture::Units::description <units>
177#----------------------------------------------------------
178
179test desc-2.0.0 {Rappture::Units::descption, blank units} {
180    list [catch {Rappture::Units::description} msg] $msg
181} {1 {wrong # args: should be "Rappture::Units::description units"}}
182
183test desc-2.1.0 {Rappture::Units::descption, invalid units} {
184# special note in the tcl bindings code reflects that i think
185# this behavior is incorrect, but tcl bindings comply with the
186# tcl version for now.
187    list [catch {Rappture::Units::description qqq} msg] $msg
188} {0 {}}
189
190test desc-2.2.0 {Rappture::Units::descption, valid units} {
191# this test passes for new tcl bindings, fails for old tcl version
192    list [catch {Rappture::Units::description eV} msg] $msg
193} {0 {energy (J,eV)}}
194
195test desc-2.2.1 {Rappture::Units::descption, *cm2*K/Vs} {
196    list [catch {Rappture::Units::description *cm2*K/Vs} msg] $msg
197} {0 {length*temperature/electric_potential*time (/V,/s,A2,C,F,K,R,in2,m2)}}
198
199test desc-2.2.2 {Rappture::Units::descption, cm2 areas} {
200    list [catch {Rappture::Units::description cm2} msg] $msg
201} {0 {area (A2,in2,m2)}}
202
203test desc-2.2.3 {Rappture::Units::descption, cm3 volumes} {
204    list [catch {Rappture::Units::description cm3} msg] $msg
205} {0 {volume (A3,in3,m3)}}
206
207test desc-2.2.4 {Rappture::Units::descption, K temperature} {
208    list [catch {Rappture::Units::description K} msg] $msg
209} {0 {temperature (C,F,K,R)}}
210
211test desc-2.2.5 {Rappture::Units::descption, s time} {
212    list [catch {Rappture::Units::description s} msg] $msg
213} {0 {time (s)}}
214
215test desc-2.3.0 {Rappture::Units::descption, too many args} {
216    list [catch {Rappture::Units::description eV ee} msg] $msg
217} {1 {wrong # args: should be "Rappture::Units::description units"}}
218
219test desc-2.3.1 {Rappture::Units::descption, incorrect input type} {
220    list [catch {Rappture::Units::description 3cm} msg] $msg
221} {0 {}}
222
223test desc-2.4.0 {Rappture::Units::descption, "mm" correct units retrieval} {
224    list [catch {Rappture::Units::description mm} msg] $msg
225} {0 {length (A,in,m)}}
226
227test desc-2.4.1 {Rappture::Units::descption, "MM" correct units retrieval} {
228    list [catch {Rappture::Units::description MM} msg] $msg
229} {0 {length (A,in,m)}}
230
231test desc-2.4.2 {Rappture::Units::descption, "mM" correct units retrieval} {
232    list [catch {Rappture::Units::description mM} msg] $msg
233} {0 {length (A,in,m)}}
234
235test desc-2.4.3 {Rappture::Units::descption, "Mm" correct units retrieval} {
236    list [catch {Rappture::Units::description Mm} msg] $msg
237} {0 {length (A,in,m)}}
238
239test desc-2.4.4 {Rappture::Units::descption, "mv" correct units retrieval} {
240    list [catch {Rappture::Units::description mv} msg] $msg
241} {0 {electric_potential (V)}}
242
243test desc-2.4.5 {Rappture::Units::descption, "mV" correct units retrieval} {
244    list [catch {Rappture::Units::description mV} msg] $msg
245} {0 {electric_potential (V)}}
246
247test desc-2.4.6 {Rappture::Units::descption, "MV" correct units retrieval} {
248    list [catch {Rappture::Units::description MV} msg] $msg
249} {0 {electric_potential (V)}}
250
251test desc-2.4.7 {Rappture::Units::descption, "Mv" correct units retrieval} {
252    list [catch {Rappture::Units::description Mv} msg] $msg
253} {0 {electric_potential (V)}}
254
255test desc-2.4.8 {Rappture::Units::descption, "ms" correct units retrieval} {
256    list [catch {Rappture::Units::description ms} msg] $msg
257} {0 {time (s)}}
258
259test desc-2.4.9 {Rappture::Units::descption, "mS" correct units retrieval} {
260    list [catch {Rappture::Units::description mS} msg] $msg
261} {0 {time (s)}}
262
263test desc-2.4.10 {Rappture::Units::descption, "MS" correct units retrieval} {
264    list [catch {Rappture::Units::description MS} msg] $msg
265} {0 {time (s)}}
266
267test desc-2.4.11 {Rappture::Units::descption, "Ms" correct units retrieval} {
268    list [catch {Rappture::Units::description Ms} msg] $msg
269} {0 {time (s)}}
270
271#----------------------------------------------------------
272#----------------------------------------------------------
273# for command
274# Rappture::Units::System::for <units>
275#----------------------------------------------------------
276
277#test for-3.0.0.1 {Rappture::Units::System::for, blank units} {
278## this test passes for old tcl version, fails for new tcl bindings
279## because of additional "::" prefixed on object name
280#    list [catch {Rappture::Units::System::for} msg] $msg
281#} {1 {wrong # args: should be "::Rappture::Units::System::for units"}}
282
283test for-3.0.0.2 {Rappture::Units::System::for, blank units} {
284    list [catch {Rappture::Units::System::for} msg] $msg
285} {1 {wrong # args: should be "Rappture::Units::System::for units"}}
286
287test for-3.1.0 {Rappture::Units::System::for, invalid units} {
288# special note in the tcl bindings code reflects that i think
289# this behavior is incorrect, but tcl bindings comply with the
290# tcl version for now.
291    list [catch {Rappture::Units::System::for qqq} msg] $msg
292} {0 {}}
293
294#test for-3.2.0.1 {Rappture::Units::System::for, valid units} {
295## this test passes for old tcl version, fails for new tcl bindings
296## because different order of units
297#    list [catch {Rappture::Units::System::for eV} msg] $msg
298#} {0 ::Rappture::Units::system6}
299
300test for-3.2.0.2 {Rappture::Units::System::for, valid units} {
301# this test passes for new tcl bindings, fails for old tcl version
302    list [catch {Rappture::Units::System::for eV} msg] $msg
303} {0 energy}
304
305#test for-3.3.0.1 {Rappture::Units::System::for, too many args} {
306## this test passes for old tcl version, fails for new tcl bindings
307## because of additional "::" prefixed on object name
308#    list [catch {Rappture::Units::System::for eV ee} msg] $msg
309#} {1 {wrong # args: should be "::Rappture::Units::System::for units"}}
310
311test for-3.3.0.2 {Rappture::Units::System::for, too many args} {
312# this test passes for new tcl bindings, fails for old tcl version
313    list [catch {Rappture::Units::System::for eV ee} msg] $msg
314} {1 {wrong # args: should be "Rappture::Units::System::for units"}}
315
316
317#----------------------------------------------------------
318#----------------------------------------------------------
319# all command
320# Rappture::Units::Sys::all <units>
321#----------------------------------------------------------
322
323#test all-4.0.0.1 {Rappture::Units::System::all, blank} {
324## this test passes for old tcl version, fails for new tcl bindings
325## because of additional "::" prefixed on object name
326#    list [catch {Rappture::Units::System::all} msg] $msg
327#} {1 {wrong # args: should be "::Rappture::Units::System::all units"}}
328
329test all-4.0.0.2 {Rappture::Units::System::all, blank units} {
330    list [catch {Rappture::Units::System::all} msg] $msg
331} {1 {wrong # args: should be "Rappture::Units::System::all units"}}
332
333test all-4.1.0 {Rappture::Units::System::all, invalid units} {
334# special note in the tcl bindings code reflects that i think
335# this behavior is incorrect, but tcl bindings comply with the
336# tcl version for now.
337    list [catch {Rappture::Units::System::all qqq} msg] $msg
338} {0 {}}
339
340#test all-4.2.0.1 {Rappture::Units::System::all, valid units} {
341## this test passes for old tcl version, fails for new tcl bindings
342## because different order of units
343#    list [catch {Rappture::Units::System::all eV} msg] $msg
344#} {0 {eV J}}
345
346test all-4.2.0.2 {Rappture::Units::System::all, valid units} {
347# this test passes for new tcl bindings, fails for old tcl version
348    list [catch {Rappture::Units::System::all eV} msg] $msg
349} {0 {J eV}}
350
351#test all-4.3.0.1 {Rappture::Units::System::all, too many args} {
352## this test passes for old tcl version, fails for new tcl bindings
353## because of additional "::" prefixed on object name
354#    list [catch {Rappture::Units::System::all eV ee} msg] $msg
355#} {1 {wrong # args: should be "::Rappture::Units::System::all units"}}
356
357test all-4.3.0.2 {Rappture::Units::System::all, too many args} {
358# this test passes for new tcl bindings, fails for old tcl version
359    list [catch {Rappture::Units::System::all eV ee} msg] $msg
360} {1 {wrong # args: should be "Rappture::Units::System::all units"}}
361
362#----------------------------------------------------------
363#----------------------------------------------------------
364# convert command - testing units conversions
365#----------------------------------------------------------
366
367test convert_units-5.4.1.0 {Rappture::Units::convert, m->A} {
368    list [catch {Rappture::Units::convert 5m -to A} msg] $msg
369} {0 5e+10A}
370
371test convert_units-5.4.1.1 {Rappture::Units::convert, m<-A} {
372    list [catch {Rappture::Units::convert 5A -to m} msg] $msg
373} {0 5e-10m}
374
375#--------------------------------------------------------------------
376# Metric Extension Conversions
377#--------------------------------------------------------------------
378
379test convert_units-5.4.2.0 {Rappture::Units::convert, m->dm} {
380    list [catch {Rappture::Units::convert 5m -to dm} msg] $msg
381} {0 50dm}
382
383test convert_units-5.4.2.1 {Rappture::Units::convert, m->cm} {
384    list [catch {Rappture::Units::convert 5m -to cm} msg] $msg
385} {0 500cm}
386
387test convert_units-5.4.2.3 {Rappture::Units::convert, m->mm} {
388    list [catch {Rappture::Units::convert 5m -to mm} msg] $msg
389} {0 5000mm}
390
391test convert_units-5.4.2.4 {Rappture::Units::convert, m->um} {
392    list [catch {Rappture::Units::convert 5m -to um} msg] $msg
393} {0 5e+06um}
394
395test convert_units-5.4.2.5 {Rappture::Units::convert, m->nm} {
396    list [catch {Rappture::Units::convert 5m -to nm} msg] $msg
397} {0 5e+09nm}
398
399test convert_units-5.4.2.6 {Rappture::Units::convert, m->pm} {
400    list [catch {Rappture::Units::convert 5m -to pm} msg] $msg
401} {0 5e+12pm}
402
403test convert_units-5.4.2.7 {Rappture::Units::convert, m->fm} {
404    list [catch {Rappture::Units::convert 5m -to fm} msg] $msg
405} {0 5e+15fm}
406
407test convert_units-5.4.2.8 {Rappture::Units::convert, m->am} {
408    list [catch {Rappture::Units::convert 5m -to am} msg] $msg
409} {0 5e+18am}
410
411test convert_units-5.4.2.9 {Rappture::Units::convert, m->dam} {
412    list [catch {Rappture::Units::convert 5m -to dam} msg] $msg
413} {0 0.5dam}
414
415test convert_units-5.4.2.10 {Rappture::Units::convert, m->hm} {
416    list [catch {Rappture::Units::convert 5m -to hm} msg] $msg
417} {0 0.05hm}
418
419test convert_units-5.4.2.11 {Rappture::Units::convert, m->km} {
420    list [catch {Rappture::Units::convert 5m -to km} msg] $msg
421} {0 0.005km}
422
423test convert_units-5.4.2.12 {Rappture::Units::convert, m->Mm} {
424    list [catch {Rappture::Units::convert 5m -to Mm} msg] $msg
425} {0 5e-06Mm}
426
427test convert_units-5.4.2.13 {Rappture::Units::convert, m->Gm} {
428    list [catch {Rappture::Units::convert 5m -to Gm} msg] $msg
429} {0 5e-09Gm}
430
431test convert_units-5.4.2.14 {Rappture::Units::convert, m->Tm} {
432    list [catch {Rappture::Units::convert 5m -to Tm} msg] $msg
433} {0 5e-12Tm}
434
435test convert_units-5.4.2.15 {Rappture::Units::convert, m->Pm} {
436    list [catch {Rappture::Units::convert 5m -to Pm} msg] $msg
437} {0 5e-15Pm}
438
439test convert_units-5.4.2.16 {Rappture::Units::convert, m->Em} {
440    list [catch {Rappture::Units::convert 5m -to Em} msg] $msg
441} {0 5e-18Em}
442
443test convert_units-5.4.2.17 {Rappture::Units::convert, dm->m} {
444    list [catch {Rappture::Units::convert 5dm -to m} msg] $msg
445} {0 0.5m}
446
447test convert_units-5.4.2.18 {Rappture::Units::convert, cm->m} {
448    list [catch {Rappture::Units::convert 5cm -to m} msg] $msg
449} {0 0.05m}
450
451test convert_units-5.4.2.19 {Rappture::Units::convert, mm->m} {
452    list [catch {Rappture::Units::convert 5mm -to m} msg] $msg
453} {0 0.005m}
454
455test convert_units-5.4.2.20 {Rappture::Units::convert, um->m} {
456    list [catch {Rappture::Units::convert 5um -to m} msg] $msg
457} {0 5e-06m}
458
459test convert_units-5.4.2.21 {Rappture::Units::convert, nm->m} {
460    list [catch {Rappture::Units::convert 5nm -to m} msg] $msg
461} {0 5e-09m}
462
463test convert_units-5.4.2.22 {Rappture::Units::convert, pm->m} {
464    list [catch {Rappture::Units::convert 5pm -to m} msg] $msg
465} {0 5e-12m}
466
467test convert_units-5.4.2.23 {Rappture::Units::convert, fm->m} {
468    list [catch {Rappture::Units::convert 5fm -to m} msg] $msg
469} {0 5e-15m}
470
471test convert_units-5.4.2.24 {Rappture::Units::convert, am->m} {
472    list [catch {Rappture::Units::convert 5am -to m} msg] $msg
473} {0 5e-18m}
474
475test convert_units-5.4.2.25 {Rappture::Units::convert, dam->m} {
476    list [catch {Rappture::Units::convert 5dam -to m} msg] $msg
477} {0 50m}
478
479test convert_units-5.4.2.26 {Rappture::Units::convert, hm->m} {
480    list [catch {Rappture::Units::convert 5hm -to m} msg] $msg
481} {0 500m}
482
483test convert_units-5.4.2.27 {Rappture::Units::convert, km->m} {
484    list [catch {Rappture::Units::convert 5km -to m} msg] $msg
485} {0 5000m}
486
487test convert_units-5.4.2.28 {Rappture::Units::convert, Mm->m} {
488    list [catch {Rappture::Units::convert 5Mm -to m} msg] $msg
489} {0 5e+06m}
490
491test convert_units-5.4.2.29 {Rappture::Units::convert, Gm->G} {
492    list [catch {Rappture::Units::convert 5Gm -to m} msg] $msg
493} {0 5e+09m}
494
495test convert_units-5.4.2.30 {Rappture::Units::convert, Tm->m} {
496    list [catch {Rappture::Units::convert 5Tm -to m} msg] $msg
497} {0 5e+12m}
498
499test convert_units-5.4.2.31 {Rappture::Units::convert, Pm->m} {
500    list [catch {Rappture::Units::convert 5Pm -to m} msg] $msg
501} {0 5e+15m}
502
503test convert_units-5.4.2.32 {Rappture::Units::convert, Em->m} {
504    list [catch {Rappture::Units::convert 5Em -to m} msg] $msg
505} {0 5e+18m}
506
507#--------------------------------------------------------------------
508# Concentration Conversions
509#--------------------------------------------------------------------
510
511test convert_units-5.4.3.0 {Rappture::Units::convert, pH->pOH} {
512    list [catch {Rappture::Units::convert 5pH -to pOH} msg] $msg
513} {0 9pOH}
514
515test convert_units-5.4.3.1 {Rappture::Units::convert, pOH->pH} {
516    list [catch {Rappture::Units::convert 9pOH -to pH} msg] $msg
517} {0 5pH}
518
519#--------------------------------------------------------------------
520# Multiple Unit Conversions
521#--------------------------------------------------------------------
522
523test convert_units-5.4.4.0 {Rappture::Units::convert, cm2/Vs->m2/kVus} {
524    list [catch {Rappture::Units::convert 2cm2/Vs -to m2/kVus} msg] $msg
525} {0 2e-07m2/kVus}
526
527test convert_units-5.4.4.1 {Rappture::Units::convert, cm2/Vs->m2/kQus} {
528    list [catch {Rappture::Units::convert 2cm2/Vs -to m2/kQus} msg] $msg
529} {1 {bad value "m2/kQus": should be a recognized unit for Rappture}}
530
531test convert_units-5.4.4.2 {Rappture::Units::convert, cm2nZ/Vs->m2/us} {
532    list [catch {Rappture::Units::convert 2cm2nZ/Vs -to m2/us} msg] $msg
533} {1 {Unrecognized units: "cm2nZ/Vs".
534Should be units of type length/time (/s,A2,in2,m2)}}
535
536test convert_units-5.4.4.3 {Rappture::Units::convert, cm2/s->m2/kVus} {
537    list [catch {Rappture::Units::convert 2cm2/s -to m2/kVus} msg] $msg
538} {1 {unmatched units in conversion: (kV-1)
539Please enter units of type length/electric_potential*time (/V,/s,A2,in2,m2)}}
540
541test convert_units-5.4.4.4 {Rappture::Units::convert, cm2/s->m2/uskV} {
542    list [catch {Rappture::Units::convert 2cm2/s -to m2/uskV} msg] $msg
543} {1 {unmatched units in conversion: (kV-1)
544Please enter units of type length/time*electric_potential (/V,/s,A2,in2,m2)}}
545
546test convert_units-5.4.4.5 {Rappture::Units::convert, cm2V/s->m2/us} {
547    list [catch {Rappture::Units::convert 2cm2V/s -to m2/us} msg] $msg
548} {1 {unmatched units in conversion: (V)
549Please enter units of type length/time (/s,A2,in2,m2)}}
550
551test convert_units-5.4.4.6 {Rappture::Units::convert, cm2V/s->m2/us} {
552    list [catch {Rappture::Units::convert 2cm2V/s -to m2/us} msg] $msg
553} {1 {unmatched units in conversion: (V)
554Please enter units of type length/time (/s,A2,in2,m2)}}
555
556test convert_units-5.4.4.7 {Rappture::Units::convert, cm2V->m2} {
557    list [catch {Rappture::Units::convert 2cm2V -to m2} msg] $msg
558} {1 {unmatched units in conversion: (V)
559Please enter units of type length (A2,in2,m2)}}
560
561test convert_units-5.4.4.8 {Rappture::Units::convert, Vcm2->m2} {
562    list [catch {Rappture::Units::convert 2Vcm2 -to m2} msg] $msg
563} {1 {unmatched units in conversion: (V)
564Please enter units of type length (A2,in2,m2)}}
565
566test convert_units-5.4.4.9 {Rappture::Units::convert, cm2->Vm2} {
567    list [catch {Rappture::Units::convert 2cm2 -to Vm2} msg] $msg
568} {1 {unmatched units in conversion: (V)
569Please enter units of type electric_potential*length (A2,V,in2,m2)}}
570
571test convert_units-5.4.4.10 {Rappture::Units::convert, cm2->m2V} {
572    list [catch {Rappture::Units::convert 2cm2 -to m2V} msg] $msg
573} {1 {unmatched units in conversion: (V)
574Please enter units of type length*electric_potential (A2,V,in2,m2)}}
575
576test convert_units-5.4.4.11 {Rappture::Units::convert, cm2A->Vm2} {
577    list [catch {Rappture::Units::convert 2cm2A -to Vm2} msg] $msg
578} {1 {unmatched units in conversion: (A) -> (V)
579Please enter units of type electric_potential*length (A2,V,in2,m2)}}
580
581test convert_units-5.4.4.12 {Rappture::Units::convert, cm2A->m2V} {
582    list [catch {Rappture::Units::convert 2cm2A -to m2V} msg] $msg
583} {1 {Conversion unavailable: (A) -> (V)
584Please enter units of type length*electric_potential (A2,V,in2,m2)}}
585
586test convert_units-5.4.4.13 {Rappture::Units::convert, Acm2->Vm2} {
587    list [catch {Rappture::Units::convert 2Acm2 -to Vm2} msg] $msg
588} {1 {unmatched units in conversion: (A) -> (V)
589Please enter units of type electric_potential*length (A2,V,in2,m2)}}
590
591test convert_units-5.4.4.14 {Rappture::Units::convert, Acm2->m2V} {
592    list [catch {Rappture::Units::convert 2Acm2 -to m2V} msg] $msg
593} {1 {Conversion unavailable: (A) -> (V)
594Please enter units of type length*electric_potential (A2,V,in2,m2)}}
595
596#--------------------------------------------------------------------
597# Inverse Unit Conversions
598#--------------------------------------------------------------------
599
600test convert_units-5.4.5.0 {Rappture::Units::convert, /cm2->/m2} {
601    list [catch {Rappture::Units::convert 2/cm2 -to /m2} msg] $msg
602} {0 20000/m2}
603
604test convert_units-5.4.5.1 {Rappture::Units::convert, cm2->/m2} {
605    list [catch {Rappture::Units::convert 1cm -to /m2} msg] $msg
606} {1 {Conversion unavailable: (cm) -> (m-2)
607Please enter units of type /length (/A2,/in2,/m2)}}
608
609#--------------------------------------------------------------------
610# Temperature Conversions
611#--------------------------------------------------------------------
612
613test convert_units-5.4.6.0 {Rappture::Units::convert, F->C} {
614    list [catch {Rappture::Units::convert 78.8F -to C} msg] $msg
615} {0 26C}
616
617test convert_units-5.4.6.1 {Rappture::Units::convert, C->F} {
618    list [catch {Rappture::Units::convert 26C -to F} msg] $msg
619} {0 78.8F}
620
621test convert_units-5.4.6.2 {Rappture::Units::convert, C->K} {
622    list [catch {Rappture::Units::convert 26C -to K} msg] $msg
623} {0 299.15K}
624
625test convert_units-5.4.6.3 {Rappture::Units::convert, K->C} {
626    list [catch {Rappture::Units::convert 299.15K -to C} msg] $msg
627} {0 26C}
628
629test convert_units-5.4.6.4 {Rappture::Units::convert, K->F} {
630    list [catch {Rappture::Units::convert 299.15K -to F} msg] $msg
631} {0 78.8F}
632
633test convert_units-5.4.6.5 {Rappture::Units::convert, F->K} {
634    list [catch {Rappture::Units::convert 78.8F -to K} msg] $msg
635} {0 299.15K}
636
637test convert_units-5.4.6.6 {Rappture::Units::convert, F->R} {
638    list [catch {Rappture::Units::convert 78.8F -to R} msg] $msg
639} {0 538.47R}
640
641test convert_units-5.4.6.7 {Rappture::Units::convert, R->F} {
642    list [catch {Rappture::Units::convert 538.47R -to F} msg] $msg
643} {0 78.8F}
644
645test convert_units-5.4.6.8 {Rappture::Units::convert, R->C} {
646    list [catch {Rappture::Units::convert 538.47R -to C} msg] $msg
647} {0 26C}
648
649test convert_units-5.4.6.9 {Rappture::Units::convert, C->R} {
650    list [catch {Rappture::Units::convert 26C -to R} msg] $msg
651} {0 538.47R}
652
653test convert_units-5.4.6.10 {Rappture::Units::convert, R->K} {
654    list [catch {Rappture::Units::convert 538.47R -to K} msg] $msg
655} {0 299.15K}
656
657test convert_units-5.4.6.11 {Rappture::Units::convert, K->R} {
658    list [catch {Rappture::Units::convert 299.15K -to R} msg] $msg
659} {0 538.47R}
660
661#--------------------------------------------------------------------
662# Energy Conversions
663#--------------------------------------------------------------------
664
665test convert_units-5.4.7.0 {Rappture::Units::convert, eV->J} {
666    list [catch {Rappture::Units::convert 5eV -to J} msg] $msg
667} {0 8.01089e-19J}
668
669test convert_units-5.4.7.1 {Rappture::Units::convert, J->eV} {
670    list [catch {Rappture::Units::convert 8.01088231e-19J -to eV} msg] $msg
671} {0 5eV}
672
673#--------------------------------------------------------------------
674# Time Conversions
675#--------------------------------------------------------------------
676
677test convert_units-5.4.8.0 {Rappture::Units::convert, s->s} {
678    list [catch {Rappture::Units::convert 5s -to s} msg] $msg
679} {0 5s}
680
681test convert_units-5.4.8.1 {Rappture::Units::convert, min->s} {
682    list [catch {Rappture::Units::convert 5min -to s} msg] $msg
683} {0 300s}
684
685test convert_units-5.4.8.2 {Rappture::Units::convert, h->s} {
686    list [catch {Rappture::Units::convert 5h -to s} msg] $msg
687} {0 18000s}
688
689test convert_units-5.4.8.3 {Rappture::Units::convert, d->s} {
690    list [catch {Rappture::Units::convert 5d -to s} msg] $msg
691} {0 432000s}
692
693test convert_units-5.4.8.4 {Rappture::Units::convert, s->min} {
694    list [catch {Rappture::Units::convert 5s -to min} msg] $msg
695} {0 0.0833333min}
696
697test convert_units-5.4.8.5 {Rappture::Units::convert, min->min} {
698    list [catch {Rappture::Units::convert 5min -to min} msg] $msg
699} {0 5min}
700
701test convert_units-5.4.8.6 {Rappture::Units::convert, h->min} {
702    list [catch {Rappture::Units::convert 5h -to min} msg] $msg
703} {0 300min}
704
705test convert_units-5.4.8.7 {Rappture::Units::convert, d->min} {
706    list [catch {Rappture::Units::convert 5d -to min} msg] $msg
707} {0 7200min}
708
709test convert_units-5.4.8.8 {Rappture::Units::convert, s->h} {
710    list [catch {Rappture::Units::convert 5s -to h} msg] $msg
711} {0 0.00138889h}
712
713test convert_units-5.4.8.9 {Rappture::Units::convert, min->h} {
714    list [catch {Rappture::Units::convert 5min -to h} msg] $msg
715} {0 0.0833333h}
716
717test convert_units-5.4.8.10 {Rappture::Units::convert, h->h} {
718    list [catch {Rappture::Units::convert 5h -to h} msg] $msg
719} {0 5h}
720
721test convert_units-5.4.8.11 {Rappture::Units::convert, d->h} {
722    list [catch {Rappture::Units::convert 5d -to h} msg] $msg
723} {0 120h}
724
725test convert_units-5.4.8.12 {Rappture::Units::convert, s->d} {
726    list [catch {Rappture::Units::convert 5s -to d} msg] $msg
727} {0 5.78704e-05d}
728
729test convert_units-5.4.8.13 {Rappture::Units::convert, min->d} {
730    list [catch {Rappture::Units::convert 5min -to d} msg] $msg
731} {0 0.00347222d}
732
733test convert_units-5.4.8.14 {Rappture::Units::convert, h->d} {
734    list [catch {Rappture::Units::convert 5h -to d} msg] $msg
735} {0 0.208333d}
736
737test convert_units-5.4.8.15 {Rappture::Units::convert, d->d} {
738    list [catch {Rappture::Units::convert 5d -to d} msg] $msg
739} {0 5d}
740
741#--------------------------------------------------------------------
742# Pressure Conversions
743#--------------------------------------------------------------------
744
745test convert_units-5.4.9.0 {Rappture::Units::convert, bar->Pa} {
746    list [catch {Rappture::Units::convert 5bar -to Pa} msg] $msg
747} {0 500000Pa}
748
749test convert_units-5.4.9.1 {Rappture::Units::convert, bar->atm} {
750    list [catch {Rappture::Units::convert 5bar -to atm} msg] $msg
751} {0 4.9346atm}
752
753test convert_units-5.4.9.2 {Rappture::Units::convert, bar->torr} {
754    list [catch {Rappture::Units::convert 5bar -to torr} msg] $msg
755} {0 3750.3torr}
756
757test convert_units-5.4.9.3 {Rappture::Units::convert, bar->psi} {
758    list [catch {Rappture::Units::convert 5bar -to psi} msg] $msg
759} {0 72.52psi}
760
761test convert_units-5.4.9.4 {Rappture::Units::convert, bar->bar} {
762    list [catch {Rappture::Units::convert 5bar -to bar} msg] $msg
763} {0 5bar}
764
765test convert_units-5.4.9.5 {Rappture::Units::convert, atm->Pa} {
766    list [catch {Rappture::Units::convert 5atm -to Pa} msg] $msg
767} {0 506625Pa}
768
769test convert_units-5.4.9.6 {Rappture::Units::convert, atm->atm} {
770    list [catch {Rappture::Units::convert 5atm -to atm} msg] $msg
771} {0 5atm}
772
773test convert_units-5.4.9.7 {Rappture::Units::convert, atm->torr} {
774    list [catch {Rappture::Units::convert 5atm -to torr} msg] $msg
775} {0 3800torr}
776
777test convert_units-5.4.9.8 {Rappture::Units::convert, atm->psi} {
778    list [catch {Rappture::Units::convert 5bar -to psi} msg] $msg
779} {0 72.52psi}
780
781test convert_units-5.4.9.9 {Rappture::Units::convert, atm->bar} {
782    list [catch {Rappture::Units::convert 5atm -to bar} msg] $msg
783} {0 5.06627bar}
784
785test convert_units-5.4.9.10 {Rappture::Units::convert, Pa->Pa} {
786    list [catch {Rappture::Units::convert 5Pa -to Pa} msg] $msg
787} {0 5Pa}
788
789test convert_units-5.4.9.11 {Rappture::Units::convert, Pa->atm} {
790    list [catch {Rappture::Units::convert 5Pa -to atm} msg] $msg
791} {0 4.9346e-05atm}
792
793test convert_units-5.4.9.12 {Rappture::Units::convert, Pa->torr} {
794    list [catch {Rappture::Units::convert 5Pa -to torr} msg] $msg
795} {0 0.037503torr}
796
797test convert_units-5.4.9.13 {Rappture::Units::convert, Pa->psi} {
798    list [catch {Rappture::Units::convert 5Pa -to psi} msg] $msg
799} {0 0.0007252psi}
800
801test convert_units-5.4.9.14 {Rappture::Units::convert, Pa->bar} {
802    list [catch {Rappture::Units::convert 5Pa -to bar} msg] $msg
803} {0 5e-05bar}
804
805test convert_units-5.4.9.15 {Rappture::Units::convert, torr->Pa} {
806    list [catch {Rappture::Units::convert 5torr -to Pa} msg] $msg
807} {0 666.613Pa}
808
809test convert_units-5.4.9.16 {Rappture::Units::convert, torr->atm} {
810    list [catch {Rappture::Units::convert 5torr -to atm} msg] $msg
811} {0 0.006579atm}
812
813test convert_units-5.4.9.17 {Rappture::Units::convert, torr->torr} {
814    list [catch {Rappture::Units::convert 5torr -to torr} msg] $msg
815} {0 5torr}
816
817test convert_units-5.4.9.18 {Rappture::Units::convert, torr->psi} {
818    list [catch {Rappture::Units::convert 5torr -to psi} msg] $msg
819} {0 0.096685psi}
820
821test convert_units-5.4.9.19 {Rappture::Units::convert, torr->bar} {
822    list [catch {Rappture::Units::convert 5torr -to bar} msg] $msg
823} {0 0.00666613bar}
824
825test convert_units-5.4.9.20 {Rappture::Units::convert, psi->Pa} {
826    list [catch {Rappture::Units::convert 5psi -to Pa} msg] $msg
827} {0 34473.8Pa}
828
829test convert_units-5.4.9.21 {Rappture::Units::convert, psi->atm} {
830    list [catch {Rappture::Units::convert 5psi -to atm} msg] $msg
831} {0 0.34023atm}
832
833test convert_units-5.4.9.22 {Rappture::Units::convert, psi->torr} {
834    list [catch {Rappture::Units::convert 5psi -to torr} msg] $msg
835} {0 258.575torr}
836
837test convert_units-5.4.9.23 {Rappture::Units::convert, psi->psi} {
838    list [catch {Rappture::Units::convert 5psi -to psi} msg] $msg
839} {0 5psi}
840
841test convert_units-5.4.9.24 {Rappture::Units::convert, psi->bar} {
842    list [catch {Rappture::Units::convert 5psi -to bar} msg] $msg
843} {0 0.344738bar}
844
845test convert_units-5.4.9.25 {Rappture::Units::convert, psi->kPa} {
846    list [catch {Rappture::Units::convert 5psi -to kPa} msg] $msg
847} {0 34.4738kPa}
848
849test convert_units-5.4.9.26 {Rappture::Units::convert, kPa->psi} {
850    list [catch {Rappture::Units::convert 5kPa -to psi} msg] $msg
851} {0 0.7252psi}
852
853test convert_units-5.4.9.27 {Rappture::Units::convert, mmHg->torr} {
854    list [catch {Rappture::Units::convert 5mmHg -to torr} msg] $msg
855} {0 5torr}
856
857test convert_units-5.4.9.28 {Rappture::Units::convert, torr->mmHg} {
858    list [catch {Rappture::Units::convert 5torr -to mmHg} msg] $msg
859} {0 5mmHg}
860
861#--------------------------------------------------------------------
862# Case Insensitive/Sensitive Unit Conversions
863#--------------------------------------------------------------------
864
865test convert_units-5.4.10.1 {Rappture::Units::convert, torr->mmhg} {
866    list [catch {Rappture::Units::convert 5torr -to mmhg} msg] $msg
867} {0 5mmHg}
868
869test convert_units-5.4.10.2 {Rappture::Units::convert, ToRr->mmhg} {
870    list [catch {Rappture::Units::convert 5ToRr -to mmhg} msg] $msg
871} {0 5mmHg}
872
873test convert_units-5.4.10.3 {Rappture::Units::convert, kpa->PSI} {
874    list [catch {Rappture::Units::convert 5kpa -to PSI} msg] $msg
875} {0 0.7252psi}
876
877test convert_units-5.4.10.4 {Rappture::Units::convert, KPA->PsI} {
878    list [catch {Rappture::Units::convert 5KPA -to PsI} msg] $msg
879} {0 0.7252psi}
880
881test convert_units-5.4.10.5 {Rappture::Units::convert, Cm2/vS->M2/KVUS} {
882    list [catch {Rappture::Units::convert 2Cm2/vS -to M2/KVUS} msg] $msg
883} {0 2e-07m2/kVus}
884
885#--------------------------------------------------------------------
886# Rappture::Units::Search::for <units>
887#--------------------------------------------------------------------
888
889test search-for-6.0.0.1 {Rappture::Units::Search::for, 300K} {
890    list [catch {Rappture::Units::Search::for 300K} msg] $msg
891} {0 K}
892
893test search-for-6.0.0.2 {Rappture::Units::Search::for, 300cm2/Vs} {
894    list [catch {Rappture::Units::Search::for 300cm2/Vs} msg] $msg
895} {0 cm2/Vs}
896
897test search-for-6.0.0.3 {Rappture::Units::Search::for, cm2/Vs} {
898    list [catch {Rappture::Units::Search::for cm2/Vs} msg] $msg
899} {0 cm2/Vs}
900
901test search-for-6.0.1.1 {Rappture::Units::Search::for, 4notaunit} {
902    list [catch {Rappture::Units::Search::for 4notaunit} msg] $msg
903} {0 {}}
904
905test search-for-6.0.1.2 {Rappture::Units::Search::for, notaunit} {
906    list [catch {Rappture::Units::Search::for notaunit} msg] $msg
907} {0 {}}
908
909test search-for-6.0.1.3 {Rappture::Units::Search::for, notaunit} {
910    list [catch {Rappture::Units::Search::for ^&} msg] $msg
911} {0 {}}
912
913test search-for-6.0.1.4 {Rappture::Units::Search::for, notaunit} {
914    list [catch {Rappture::Units::Search::for x44} msg] $msg
915} {0 {}}
916
917test search-for-6.0.1.5 {Rappture::Units::Search::for, notaunit} {
918    list [catch {Rappture::Units::Search::for 3*44eV} msg] $msg
919} {0 {}}
920
921test search-for-6.0.2.0 {Rappture::Units::Search::for, case searches - m} {
922    set unit "m"
923    set status1 [catch {Rappture::Units::Search::for $unit} runit]
924    set status2 [catch {Rappture::Units::System::for $unit} type]
925    list $status1 $runit $status2 $type
926} {0 m 0 length}
927
928test search-for-6.0.2.1 {Rappture::Units::Search::for, case searches - M} {
929    set unit "M"
930    set status1 [catch {Rappture::Units::Search::for $unit} runit]
931    set status2 [catch {Rappture::Units::System::for $unit} type]
932    list $status1 $runit $status2 $type
933} {0 m 0 length}
934
935test search-for-6.0.2.2 {Rappture::Units::Search::for, case searches - mm} {
936    set unit "mm"
937    set status1 [catch {Rappture::Units::Search::for $unit} runit]
938    set status2 [catch {Rappture::Units::System::for $unit} type]
939    list $status1 $runit $status2 $type
940} {0 mm 0 length}
941
942test search-for-6.0.2.3 {Rappture::Units::Search::for, case searches - Mm} {
943    set unit "Mm"
944    set status1 [catch {Rappture::Units::Search::for $unit} runit]
945    set status2 [catch {Rappture::Units::System::for $unit} type]
946    list $status1 $runit $status2 $type
947} {0 Mm 0 length}
948
949test search-for-6.0.2.4 {Rappture::Units::Search::for, case searches - MM} {
950    set unit "MM"
951    set status1 [catch {Rappture::Units::Search::for $unit} runit]
952    set status2 [catch {Rappture::Units::System::for $unit} type]
953    list $status1 $runit $status2 $type
954} {0 Mm 0 length}
955
956test search-for-6.0.2.5 {Rappture::Units::Search::for, case searches - mM} {
957    set unit "mM"
958    set status1 [catch {Rappture::Units::Search::for $unit} runit]
959    set status2 [catch {Rappture::Units::System::for $unit} type]
960    list $status1 $runit $status2 $type
961} {0 mm 0 length}
962
963test search-for-6.0.2.6 {Rappture::Units::Search::for, case searches - ks} {
964    set unit "ks"
965    set status1 [catch {Rappture::Units::Search::for $unit} runit]
966    set status2 [catch {Rappture::Units::System::for $unit} type]
967    list $status1 $runit $status2 $type
968} {0 ks 0 time}
969
970test search-for-6.0.2.7 {Rappture::Units::Search::for, case searches - Ks} {
971    set unit "Ks"
972    set status1 [catch {Rappture::Units::Search::for $unit} runit]
973    set status2 [catch {Rappture::Units::System::for $unit} type]
974    list $status1 $runit $status2 $type
975} {0 ks 0 time}
976
977test search-for-6.0.2.8 {Rappture::Units::Search::for, case searches - kS} {
978    set unit "kS"
979    set status1 [catch {Rappture::Units::Search::for $unit} runit]
980    set status2 [catch {Rappture::Units::System::for $unit} type]
981    list $status1 $runit $status2 $type
982} {0 ks 0 time}
983
984test search-for-6.0.2.9 {Rappture::Units::Search::for, case searches - KS} {
985    set unit "KS"
986    set status1 [catch {Rappture::Units::Search::for $unit} runit]
987    set status2 [catch {Rappture::Units::System::for $unit} type]
988    list $status1 $runit $status2 $type
989} {0 ks 0 time}
990
991test search-for-6.0.2.10 {Rappture::Units::Search::for, case searches - sk} {
992    set unit "sk"
993    set status1 [catch {Rappture::Units::Search::for $unit} runit]
994    set status2 [catch {Rappture::Units::System::for $unit} type]
995    list $status1 $runit $status2 $type
996} {0 sK 0 time*temperature}
997
998test search-for-6.0.2.11 {Rappture::Units::Search::for, case searches - sK} {
999    set unit "sK"
1000    set status1 [catch {Rappture::Units::Search::for $unit} runit]
1001    set status2 [catch {Rappture::Units::System::for $unit} type]
1002    list $status1 $runit $status2 $type
1003} {0 sK 0 time*temperature}
1004
1005::tcltest::cleanupTests
1006return
1007
Note: See TracBrowser for help on using the repository browser.