Index: /branches/blt4/oldtest/Makefile.in
===================================================================
--- /branches/blt4/oldtest/Makefile.in	(revision 2040)
+++ /branches/blt4/oldtest/Makefile.in	(revision 2040)
@@ -0,0 +1,43 @@
+# you need to change this to where your version of python is installed.
+# tell make where to find python header files
+RP_INSTALL_BASE = @prefix@
+
+# define the top of the rappture directory structure
+RP_BASE         = @RP_BASE@
+
+
+CC              = @CC@
+CXX             = @CXX@
+DEBUG           = -g -Wall
+DEBUG_PLUS      = -g -DDEBUG
+
+LN              = @LN@
+
+# define our directories
+#
+INCLUDES_DIR    = $(RP_BASE)/src
+BIN_DIR         = $(RP_BASE)/bin
+LIB_DIR         = $(RP_INSTALL_BASE)/lib # $(RP_BASE)/src
+SRC_DIR         = $(RP_BASE)/src
+TEST_DIR        = $(RP_BASE)/test
+
+LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
+
+INCL_CORE       = -I $(INCLUDES_DIR)/core
+INCL_CEE        = -I $(INCLUDES_DIR)/cee
+INCL_FORTRAN    = -I $(INCLUDES_DIR)/fortran
+
+
+.PHONY: src jobs
+	
+all: src jobs
+
+src:
+	$(MAKE) -C src all
+jobs:
+	$(MAKE) -C jobs all
+
+clean: 
+	
+distclean: clean
+	$(RM) Makefile
Index: /branches/blt4/oldtest/buggy_xmls/disabledtabs/readme
===================================================================
--- /branches/blt4/oldtest/buggy_xmls/disabledtabs/readme	(revision 2040)
+++ /branches/blt4/oldtest/buggy_xmls/disabledtabs/readme	(revision 2040)
@@ -0,0 +1,21 @@
+This is an example from Satoshi Ishii working on PhotonicsDB. He was trying
+to setup tabs in the gui by using groups of groups. He wanted the first and
+last tab to always be enabled. The tabs in between the first and last
+contained enable tests.
+
+Rappture was able to successfully create the tabs, but the last tab always
+contained data from the first disabled tab. The cause of this problem is that
+gui/scripts/control.tcl, which is in charge of setting up the tabs, gets an
+index of which tab was selected and uses this index to access the name and
+value of the tab to be shown. The index is used in a list which contains all
+possible tabs, not a list that contains only the enabled tabs. The result is
+that when we have a list containing five total tabs numbered 1-5, and tabs
+1,2, and 5 are enabled, an index of 3 would choose a disabled tab to show.
+
+This problem was solved by adding an additional private variable to the
+controls object that keeps track of which tabs are enabled and shown. We now
+index into the _showing list instead of the _controls list. In the example
+above the _showing list would contain tabs 1, 2 and 5. When the last tab was
+chosen in the graphical user interface, _changeTabs function would receive
+an index of 3 referencing tab 5 and the correct tab would be displayed to the
+user.
Index: /branches/blt4/oldtest/buggy_xmls/disabledtabs/tool.xml
===================================================================
--- /branches/blt4/oldtest/buggy_xmls/disabledtabs/tool.xml	(revision 2040)
+++ /branches/blt4/oldtest/buggy_xmls/disabledtabs/tool.xml	(revision 2040)
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<run>
+<tool>
+    <layout>wizard</layout>
+</tool>
+<input>
+    <integer id="layers">
+        <default>1</default>
+    </integer>
+    <group id="tabs">
+        <group id="front">
+            <about>
+                <label>FRONT</label>
+            </about>
+            <loader>
+                <about>
+                    <label>Front</label>
+                    <description>Specify the material.</description>
+                </about>
+            </loader>
+        </group>
+        <group id="layer1">
+            <about>
+                <label>Layer 1</label>
+            </about>
+            <loader>
+                <about>
+                    <label>Layer 1</label>
+                    <description>Specify the material.</description>
+                </about>
+            </loader>
+        </group>
+        <group id="layer2">
+            <about>
+                <label>Layer 2</label>
+                <enable>input.integer(layers) &gt;=2 </enable>
+            </about>
+            <loader>
+                <about>
+                    <label>Layer 2</label>
+                    <description>Specify the material.</description>
+                    <!-- <enable>input.integer(layers) &gt;=2 </enable> -->
+                </about>
+            </loader>
+        </group>
+        <group id="layer3">
+            <about>
+                <label>Layer 3</label>
+                <enable>input.integer(layers) &gt;=3 </enable>
+            </about>
+            <loader>
+                <about>
+                    <label>Layer 3</label>
+                    <description>Specify the material.</description>
+                    <enable>input.integer(layers) &gt;=3 </enable>
+                </about>
+            </loader>
+        </group>
+        <group id="back">
+            <about>
+                <label>BACK</label>
+                <enable>input.integer(layers) &gt;=0 </enable>
+            </about>
+            <loader>
+                <about>
+                    <label>Back</label>
+                    <description>Specify the material.</description>
+                </about>
+            </loader>
+        </group>
+    </group>
+</input>
+</run>
Index: /branches/blt4/oldtest/jobs/coredumps/coredump.tcl
===================================================================
--- /branches/blt4/oldtest/jobs/coredumps/coredump.tcl	(revision 2040)
+++ /branches/blt4/oldtest/jobs/coredumps/coredump.tcl	(revision 2040)
@@ -0,0 +1,35 @@
+# ----------------------------------------------------------------------
+#  EXAMPLE: Rappture core dumps
+# ======================================================================
+#  AUTHOR:  Michael McLennan, Purdue University
+#  Copyright (c) 2004-2007  Purdue Research Foundation
+#
+#  See the file "license.terms" for information on usage and
+#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# ======================================================================
+package require Rappture
+
+# open the XML file containing the run parameters
+set driver [Rappture::library [lindex $argv 0]]
+
+set type [$driver get input.(jobtype).current]
+set sig [$driver get input.(signal).current]
+
+proc killjob {signal} {
+    set jobs [exec ps uxaw | grep -v grep | grep =[pid]]
+    exec kill -s $signal [lindex $jobs 1]
+}
+
+if {$type == "fail"} {
+    after [expr {int(rand()*5000)}] "killjob $sig"
+}
+
+if {[catch {Rappture::exec tclsh genoutput.tcl =[pid]} result]} {
+    puts $result
+    exit 1
+}
+
+$driver put output.log "Job succeeded:\n$result"
+
+Rappture::result $driver
+exit 0
Index: /branches/blt4/oldtest/jobs/coredumps/genoutput.tcl
===================================================================
--- /branches/blt4/oldtest/jobs/coredumps/genoutput.tcl	(revision 2040)
+++ /branches/blt4/oldtest/jobs/coredumps/genoutput.tcl	(revision 2040)
@@ -0,0 +1,16 @@
+# ----------------------------------------------------------------------
+#  EXAMPLE: Rappture core dumps
+# ======================================================================
+#  AUTHOR:  Michael McLennan, Purdue University
+#  Copyright (c) 2004-2007  Purdue Research Foundation
+#
+#  See the file "license.terms" for information on usage and
+#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# ======================================================================
+
+# spit out a bunch of junk until we get killed
+set n 10
+while {[incr n -1] > 0} {
+    puts [exec fortune]
+    after [expr {int(rand()*rand()*3000)}]
+}
Index: /branches/blt4/oldtest/jobs/coredumps/tool.xml
===================================================================
--- /branches/blt4/oldtest/jobs/coredumps/tool.xml	(revision 2040)
+++ /branches/blt4/oldtest/jobs/coredumps/tool.xml	(revision 2040)
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+<run>
+<tool>
+  <title>coredumps</title>
+  <about>Tests what happens when a tool dumps core or gets some other exceptional signal.  Should return an understandable error.
+  </about>
+  <command>
+    tclsh @tool/coredump.tcl @driver
+  </command>
+</tool>
+<input>
+  <choice id="jobtype">
+    <about>
+      <label>Job will</label>
+      <description>Determines whether the job will succeed or fail.</description>
+    </about>
+    <option>
+      <about><label>Succeed</label></about>
+      <value>succeed</value>
+    </option>
+    <option>
+      <about><label>Fail</label></about>
+      <value>fail</value>
+    </option>
+    <default>fail</default>
+  </choice>
+
+  <choice id="signal">
+    <about>
+      <label>Send signal</label>
+      <description>If the job should fail, this determines the signal that we'll send to terminate the job.</description>
+      <enable>input.(jobtype) == "fail"</enable>
+    </about>
+    <option>
+      <about>
+       <label>SIGHUP</label>
+       <description>Hangup detected on controlling terminal</description>
+      </about>
+      <value>1</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGINT</label>
+       <description>Interrupt from keyboard</description>
+      </about>
+      <value>2</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGQUIT</label>
+       <description>Quit from keyboard</description>
+      </about>
+      <value>3</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGILL</label>
+       <description>Illegal Instruction</description>
+      </about>
+      <value>4</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGABRT</label>
+       <description>Abort signal from abort()</description>
+      </about>
+      <value>6</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGFPE</label>
+       <description>Floating point exception</description>
+      </about>
+      <value>8</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGKILL</label>
+       <description>Kill signal</description>
+      </about>
+      <value>9</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGSEGV</label>
+       <description>Invalid memory reference</description>
+      </about>
+      <value>11</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGPIPE</label>
+       <description>Broken pipe: write to pipe with no readers</description>
+      </about>
+      <value>13</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGALRM</label>
+       <description>Timer signal from alarm()</description>
+      </about>
+      <value>14</value>
+    </option>
+    <option>
+      <about>
+       <label>SIGTERM</label>
+       <description>Termination signal</description>
+      </about>
+      <value>15</value>
+    </option>
+    <default>11</default>
+  </choice>
+</input>
+</run>
Index: /branches/blt4/oldtest/rplib_test.xml
===================================================================
--- /branches/blt4/oldtest/rplib_test.xml	(revision 2040)
+++ /branches/blt4/oldtest/rplib_test.xml	(revision 2040)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<run>
+    <tool>
+        <title>Graphing Calculator</title>
+        <about>Press Simulate to view results.</about>
+        <command> @tool/graph @driver</command>
+    </tool>
+    <input>
+        <string id="formula">
+            <about>
+                <label>Formula</label>
+                <hints>Example: 2*x + 1</hints>
+            </about>
+            <size>30x5</size>
+        </string>
+        <number id="min">
+            <about> <label>From x</label> </about>
+            <default>0</default>
+            <current>1</current>
+        </number>
+        <number id="max">
+            <about> <label>To x</label> </about>
+            <default>2</default>
+            <current>3</current>
+        </number>
+    </input>
+    <output>
+        <curve id="result">
+            <about> <label>Formula: Y vs X</label> </about>
+        </curve>
+    </output>
+</run>
+
Index: /branches/blt4/oldtest/src/Makefile.in
===================================================================
--- /branches/blt4/oldtest/src/Makefile.in	(revision 2040)
+++ /branches/blt4/oldtest/src/Makefile.in	(revision 2040)
@@ -0,0 +1,176 @@
+
+bindir          = @bindir@
+datadir		= @datadir@
+datarootdir	= @datarootdir@
+exec_prefix     = @exec_prefix@
+includedir      = @includedir@
+libdir          = @libdir@
+mandir          = @mandir@
+prefix          = @prefix@
+srcdir		= @srcdir@
+
+INSTALL		= @INSTALL@
+INSTALL_PROGRAM	= ${INSTALL} -m 755
+INSTALL_DATA	= ${INSTALL} -m 644
+INSTALL_SCRIPT	= ${INSTALL}
+
+CXX             = @CXX@
+CC              = @CC@
+FC		= @F77@
+OCT		= @MKOCT@
+MEX		= @MEX@
+CFLAGS_DEBUG    = @CFLAGS_DEBUG@
+CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
+STLIB_LD        = @STLIB_LD@
+SHLIB_LD        = @SHLIB_LD@
+SHLIB_CFLAGS    = @SHLIB_CFLAGS@
+SHLIB_LDFLAGS   = @SHLIB_LDFLAGS@
+SHLIB_SUFFIX    = @SHLIB_SUFFIX@
+CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
+LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
+CFLAGS          = @CFLAGS@
+
+INCLUDES	= -I$(srcdir) \
+		  -I$(includedir)
+
+RANLIB 		= @RANLIB@
+AR 		= ar
+VPATH		= $(srcdir)
+RM		= rm -f
+
+# define the top of the rappture directory structure
+RP_BASE   = @RP_BASE@
+
+# you need to change this to where your version of python is installed.
+# tell make where to find python header files
+RP_INSTALL_BASE = @prefix@
+
+# define the top of the rappture directory structure
+RP_BASE         = @RP_BASE@
+
+
+CC              = @CC@
+CXX             = @CXX@
+DEBUG           = -g -Wall
+DEBUG_PLUS      = -g -DDEBUG
+
+LN              = @LN@
+
+# define our directories
+#
+INCLUDES_DIR    = $(RP_BASE)/src
+BIN_DIR         = $(RP_BASE)/bin
+LIB_DIR         = $(RP_INSTALL_BASE)/lib # $(RP_BASE)/src
+SRC_DIR         = $(RP_BASE)/src
+TEST_DIR        = $(RP_BASE)/test
+
+LIB_RAPPTURE    = -Wl,--rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
+
+INCL_CORE       = -I $(INCLUDES_DIR)/core
+INCL_CEE        = -I $(INCLUDES_DIR)/cee
+INCL_FORTRAN    = -I $(INCLUDES_DIR)/fortran
+INCLUDES	= \
+		-I../../src/core \
+		-I$(includedir)
+RUN_PATH	= $(PWD)/../../src/core:$(PWD)/../../src/objects
+LIBS 		= \
+		../../src/core/librappture.a  \
+		../../src/objects/libRpObjects.a \
+
+CC_FLAGS	= $(CFLAGS) $(INCLUDES)
+FC_FLAGS	= $(CFLAGS) $(INCLUDES)
+
+.PHONY: src jobs
+
+MATLAB_TESTS    = RpMatlab_test
+OCTAVE_TESTS	= RpOctave_test  
+
+FORTRAN_TESTS 	 = \
+		RpLibraryF_test \
+		RpUnitsF_test  \
+		RpFortranDocExamples
+
+OBJS_TESTS	 = \
+		RpBoolean_test  \
+		RpChoice_test \
+		RpLibrary_test \
+		RpNumber_test \
+		RpString_test \
+		RpUnits_test \
+		RpVariable_test 
+
+CC_TESTS 	 = \
+		RpLibraryC_test \
+		RpUnitsC_test 
+F77_TESTS 	 = \
+		RpLibraryF_test.f \
+		RpUnitsF_test.f 
+
+all: src jobs
+
+
+c_tests: $(CC_TESTS)
+fortran_tests: $(FORTRAN_TESTS)
+matlab_tests: $(MATLAB_TESTS)
+objs_tests: $(OBJS_TESTS)
+octave_tests: $(MATLAB_TESTS)
+
+
+RpOctave_test: RpOctave_test.m
+	$(OCT) $(OCT_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+
+RpMatlab_test: RpMatlab_test.m
+	$(MEX) $(MEX_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+
+RpLibraryF_test: RpLibraryF_test.f
+	$(FC) $(FC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpUnitsF_test: RpUnitsF_test.f
+	$(FC) $(FC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpFortranDocExamples: RpFortranDocExamples.f
+	$(FC) $(FC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+
+RpLibraryC_test: RpLibraryC_test.c  
+	$(CC) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpUnitsC_test: RpUnitsC_test.c  
+	$(CC) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+
+RpBoolean_test: RpBoolean_test.cc  
+	$(CXX) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpChoice_test: RpChoice_test.cc  
+	$(CXX) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpLibrary_test: RpLibrary_test.cc  
+	$(CXX) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpNumber_test: RpNumber_test.cc  
+	$(CXX) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpString_test: RpString_test.cc  
+	$(CXX) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpUnits_test: RpUnits_test.cc  
+	$(CXX) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+RpVariable_test: RpVariable_test.cc  
+	$(CXX) $(CC_FLAGS) $< -o $@ $(LIBS)
+	./$@ ../rplib_test.xml > /dev/null
+
+src:
+	$(MAKE) -C src all
+jobs:
+	$(MAKE) -C jobs all
+
+clean: 
+	$(RM) $(OCT_TESTS) $(MATLAB_TESTS) $(CC_TESTS) $(FORTRAN_TESTS) \
+		$(OBJS_TESTS)
+
+distclean: clean
+	$(RM) Makefile
Index: /branches/blt4/oldtest/src/RpBoolean_test.cc
===================================================================
--- /branches/blt4/oldtest/src/RpBoolean_test.cc	(revision 2040)
+++ /branches/blt4/oldtest/src/RpBoolean_test.cc	(revision 2040)
@@ -0,0 +1,94 @@
+/*
+ * ======================================================================
+ *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include "RpBoolean.h"
+
+int test_setPath(RpBoolean* myBoolean);
+int test_setDefaultValue(RpBoolean* myBoolean);
+int test_setCurrentValue(RpBoolean* myBoolean);
+int test_setLabel(RpBoolean* myBoolean);
+int test_setDesc(RpBoolean* myBoolean);
+
+int test_setPath(RpBoolean* myBoolean)
+{
+    std::cout << "Path " << myBoolean->getPath() << std::endl;
+    myBoolean->setPath("input.(ambiant)");
+    std::cout << "Path " << myBoolean->getPath() << std::endl;
+
+    return 1;
+}
+
+
+int test_setDefaultValue(RpBoolean* myBoolean)
+{
+    std::cout << "defaultVal " << myBoolean->getDefaultValue() << std::endl;
+    myBoolean->setDefaultValue("new default value");
+    std::cout << "defaultVal " << myBoolean->getDefaultValue() << std::endl;
+
+    return 1;
+}
+
+int test_setCurrentValue(RpBoolean* myBoolean)
+{
+    std::cout << "currentVal " << myBoolean->getCurrentValue() << std::endl;
+    myBoolean->setCurrentValue("new current value");
+    std::cout << "currentVal " << myBoolean->getCurrentValue() << std::endl;
+
+    return 1;
+}
+
+int test_setLabel(RpBoolean* myBoolean)
+{
+    std::cout << "label " << myBoolean->getLabel() << std::endl;
+    myBoolean->setLabel("newLabel");
+    std::cout << "label " << myBoolean->getLabel() << std::endl;
+
+    return 1;
+}
+
+int test_setDesc(RpBoolean* myBoolean)
+{
+    std::cout << "desc " << myBoolean->getDesc() << std::endl;
+    myBoolean->setDesc("new description");
+    std::cout << "desc " << myBoolean->getDesc() << std::endl;
+
+    return 1;
+}
+
+int main ()
+{
+
+    RpBoolean* T1 = new RpBoolean("input.(ambient).(temperature)","default-string");
+    RpBoolean* T2 = new RpBoolean("input.(ambient).(temperature)",
+                                "default-string",
+                                "boolean2's label",
+                                "boolean2's desc"
+                                );
+    
+
+    std::cout << "T1 run" << std::endl;
+    test_setPath(T1);
+    test_setDefaultValue(T1);
+    test_setCurrentValue(T1);
+    test_setLabel(T1);
+    test_setDesc(T1);
+
+    std::cout << std::endl;
+
+    std::cout << "T2 run" << std::endl;
+    test_setPath(T2);
+    test_setDefaultValue(T2);
+    test_setCurrentValue(T2);
+    test_setLabel(T2);
+    test_setDesc(T2);
+
+    std::cout << std::endl;
+    std::cout << std::endl;
+
+    return 0;
+}
Index: /branches/blt4/oldtest/src/RpChoice_test.cc
===================================================================
--- /branches/blt4/oldtest/src/RpChoice_test.cc	(revision 2040)
+++ /branches/blt4/oldtest/src/RpChoice_test.cc	(revision 2040)
@@ -0,0 +1,108 @@
+/*
+ * ======================================================================
+ *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include "RpChoice.h"
+
+int test_setPath(RpChoice* myChoice);
+int test_setDefaultValue(RpChoice* myChoice);
+int test_setCurrentValue(RpChoice* myChoice);
+int test_setOption(RpChoice* myChoice);
+int test_deleteOption(RpChoice* myChoice);
+
+int test_setPath(RpChoice* myChoice)
+{
+    std::cout << "Path " << myChoice->getPath() << std::endl;
+    myChoice->setPath("input.(ambiant)");
+    std::cout << "Path " << myChoice->getPath() << std::endl;
+
+    return 1;
+}
+
+int test_setDefaultValue(RpChoice* myChoice)
+{
+    std::cout << "defaultVal " << myChoice->getDefaultValue() << std::endl;
+    myChoice->setDefaultValue("new default value");
+    std::cout << "defaultVal " << myChoice->getDefaultValue() << std::endl;
+
+    return 1;
+}
+
+int test_setCurrentValue(RpChoice* myChoice)
+{
+    std::cout << "currentVal " << myChoice->getCurrentValue() << std::endl;
+    myChoice->setCurrentValue("new current value");
+    std::cout << "currentVal " << myChoice->getCurrentValue() << std::endl;
+
+    return 1;
+}
+
+int test_setOption(RpChoice* myChoice)
+{
+    unsigned int optListSize = myChoice->getOptListSize();
+    myChoice->setOption("newOpt");
+    std::string tmpOpt= myChoice->getFirstOption();
+    std::string optList;
+
+    std::cout << "begin setOption optListSize = " << optListSize << std::endl;
+
+    while (tmpOpt != "") {
+        optList += tmpOpt + " ";
+        tmpOpt= myChoice->getNextOption();
+    }
+
+    std::cout << "setOption List = " << optList << std::endl;
+    std::cout << "end setOption optListSize = " << myChoice->getOptListSize() << std::endl;
+
+    return 1;
+}
+
+int test_deleteOption(RpChoice* myChoice)
+{
+    std::string tmpOpt= myChoice->getFirstOption();
+
+    std::cout << "begin deleteOption optListSize = " << myChoice->getOptListSize() << std::endl;
+    myChoice->deleteOption("newOpt");
+    std::cout << "end deleteOption optListSize = " << myChoice->getOptListSize() << std::endl;
+
+    return 1;
+}
+
+int main ()
+{
+
+    RpChoice* T1 = new RpChoice("input.(ambient).(temperature)",
+                                "default-string",
+                                "opt1,opt2,opt3");
+    RpChoice* T2 = new RpChoice("input.(ambient).(temperature)",
+                                "default-string",
+                                "string3's label",
+                                "string3's desc",
+                                "opt4,opt5,opt6");
+    
+
+    std::cout << "T1 run" << std::endl;
+    test_setPath(T1);
+    test_setDefaultValue(T1);
+    test_setCurrentValue(T1);
+    test_setOption(T1);
+    test_deleteOption(T1);
+
+    std::cout << std::endl;
+
+    std::cout << "T2 run" << std::endl;
+    test_setPath(T2);
+    test_setDefaultValue(T2);
+    test_setCurrentValue(T2);
+    test_setOption(T2);
+    test_deleteOption(T2);
+
+    std::cout << std::endl;
+    std::cout << std::endl;
+
+    return 0;
+}
Index: /branches/blt4/oldtest/src/RpFortranDocExamples.f
===================================================================
--- /branches/blt4/oldtest/src/RpFortranDocExamples.f	(revision 2040)
+++ /branches/blt4/oldtest/src/RpFortranDocExamples.f	(revision 2040)
@@ -0,0 +1,401 @@
+c ----------------------------------------------------------------------
+c  TEST: Fortran Documentation Examples.
+c
+c  Simple tests of Rappture's Fortran API found on our website
+c https://developer.nanohub.org/projects/rappture/wiki/rappture_fortran_api
+c
+c ======================================================================
+c  AUTHOR:  Derrick S. Kearney, Purdue University
+c  Copyright (c) 2004-2005  Purdue Research Foundation
+c
+c  See the file "license.terms" for information on usage and
+c  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+c ======================================================================
+      SUBROUTINE  test_rp_lib(filename)
+
+        integer handle, rp_lib
+        character*100 filename
+        handle = rp_lib(filename)
+        print *,handle
+
+      END SUBROUTINE  test_rp_lib
+
+      SUBROUTINE  test_rp_lib_element_comp(filename)
+
+        character*100 filename
+        character*100 path,retText
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature)"
+        call rp_lib_element_comp(libHandle,path,retText)
+
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_element_comp
+
+      SUBROUTINE  test_rp_lib_element_id(filename)
+
+        character*100 filename
+        character*100 path,retText
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature)"
+        call rp_lib_element_id(libHandle,path,retText)
+
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_element_id
+
+      SUBROUTINE  test_rp_lib_element_type(filename)
+
+        character*100 filename
+        character*100 path,retText
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature)"
+        call rp_lib_element_type(libHandle,path,retText)
+
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_element_type
+
+      SUBROUTINE  test_rp_lib_element_obj(filename)
+
+        character*100 filename
+        character*100 path
+        integer libHandle, rp_lib, rp_lib_element_obj, newHandle
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature)"
+        newHandle =  rp_lib_element_obj(libHandle,path)
+
+        print *,newHandle
+
+      END SUBROUTINE  test_rp_lib_element_obj
+
+      SUBROUTINE  test_rp_lib_children(filename)
+
+        character*100 filename
+        character*100 retText
+        integer rp_lib_children, childHandle, prevChildHandle
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        prevChildHandle = 0
+        childHandle = -1
+
+ 10     continue
+            childHandle =
+     +               rp_lib_children(libHandle,"input",prevChildHandle)
+            if (childHandle .gt. 0) then
+                call rp_lib_node_comp(childHandle,retText)
+                print *,"component name: ",retText
+           endif
+            prevChildHandle = childHandle
+        if (childHandle .gt. 0) goto 10
+
+      END SUBROUTINE  test_rp_lib_children
+
+      SUBROUTINE  test_rp_lib_get(filename)
+        character*100 filename
+        character*100 path,retText
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature).current"
+        call rp_lib_get(libHandle,path,retText)
+
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_get
+
+      SUBROUTINE  test_rp_lib_put_str(filename)
+        character*100 filename
+        character*500 path,retText
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature).min"
+        call rp_lib_put_str(libHandle,path,"10",0)
+
+        call rp_lib_xml(libHandle,retText)
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_put_str
+
+      SUBROUTINE  test_rp_lib_node_comp(filename)
+        character*100 filename
+        character*100 retText,path
+        integer rp_lib_element_obj, newHandle
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature)"
+        newHandle = rp_lib_element_obj(libHandle,path)
+        call rp_lib_node_comp(newHandle,retText)
+
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_node_comp
+
+      SUBROUTINE  test_rp_lib_node_type(filename)
+        character*100 filename
+        character*100 retText,path
+        integer rp_lib_element_obj, newHandle
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature)"
+        newHandle = rp_lib_element_obj(libHandle,path)
+        call rp_lib_node_type(newHandle,retText)
+
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_node_type
+
+      SUBROUTINE  test_rp_lib_node_id(filename)
+        character*100 filename
+        character*100 retText,path
+        integer rp_lib_element_obj, newHandle
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        path = "input.number(temperature)"
+        newHandle = rp_lib_element_obj(libHandle,path)
+        call rp_lib_node_id(newHandle,retText)
+
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_node_id
+
+      SUBROUTINE  test_rp_lib_xml(filename)
+        character*100 filename
+        character*500 retText
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+
+        call rp_lib_xml(libHandle,retText)
+        print *,retText
+
+      END SUBROUTINE  test_rp_lib_xml
+
+      SUBROUTINE  test_rp_result(filename)
+        character*100 filename
+        integer libHandle, rp_lib
+
+        libHandle = rp_lib(filename)
+        call rp_result(libHandle)
+
+      END SUBROUTINE  test_rp_result
+
+      SUBROUTINE  test_rp_define_unit()
+
+        integer unitHandle, rp_define_unit
+        unitHandle = rp_define_unit('oir',0)
+        unitHandle = rp_define_unit('oi4',0)
+        print *,"unitHandle = ",unitHandle
+
+      END SUBROUTINE  test_rp_define_unit
+
+      SUBROUTINE  test_rp_find()
+
+        integer unitHandle, rp_find
+        unitHandle = rp_find('oir')
+        print *,"unitHandle = ",unitHandle
+
+      END SUBROUTINE  test_rp_find
+
+      SUBROUTINE  test_rp_make_metric()
+
+        integer unitHandle, rp_find, rp_make_metric, ok
+        unitHandle = rp_find('oir')
+        if (unitHandle .gt. 0) then
+            ok = rp_make_metric(unitHandle)
+            unitHandle = rp_find('coir')
+            print *,"unitHandle = ",unitHandle
+        else
+            print *,"rp_make_metric FAILED!!!"
+        endif
+      END SUBROUTINE  test_rp_make_metric
+
+      SUBROUTINE  test_rp_get_units()
+        integer unitHandle, rp_find, rp_get_units, ok
+        character*100 unitsName
+        unitHandle = rp_find('oir')
+        if (unitHandle .gt. 0) then
+            ok = rp_get_units(unitHandle,unitsName)
+            print *,"units = ",unitsName
+        else
+            print *,"rp_get_units FAILED!!!"
+        endif
+      END SUBROUTINE  test_rp_get_units
+
+      SUBROUTINE  test_rp_get_units_name()
+        integer unitHandle, rp_find, rp_get_units_name, ok
+        character*100 unitsName
+        unitHandle = rp_find('oir')
+        if (unitHandle .gt. 0) then
+            ok = rp_get_units_name(unitHandle,unitsName)
+            print *,"units = ",unitsName
+        else
+            print *,"rp_get_units_name FAILED!!!"
+        endif
+      END SUBROUTINE  test_rp_get_units_name
+
+      SUBROUTINE  test_rp_get_exponent()
+        integer unitHandle, rp_find, ok
+        double precision expon
+        unitHandle = rp_find('oi4')
+        if (unitHandle .gt. 0) then
+            ok = rp_get_exponent(unitHandle,expon)
+            print *,"exponent = ",expon
+        else
+            print *,"rp_get_exponent FAILED!!!"
+        endif
+      END SUBROUTINE  test_rp_get_exponent
+
+      SUBROUTINE  test_rp_get_basis()
+        integer unitHandle, basisHandle
+        integer rp_get_units_name, rp_get_basis,rp_find
+        character*100 unitName, basisName
+        unitHandle = rp_find('oi4')
+        if (unitHandle .gt. 0) then
+            basisHandle = rp_get_basis(unitHandle)
+            ok = rp_get_units_name(unitHandle,unitName)
+            ok = rp_get_units_name(basisHandle,basisName)
+            if (basisHandle .gt. 0) then
+                print *,unitName,"'s basisName = ",basisName
+            else
+                print *,unitName," has no basis"
+            endif
+        else
+            print *,"rp_get_basis FAILED!!!"
+        endif
+
+        unitHandle = rp_find('nm')
+        if (unitHandle .gt. 0) then
+            basisHandle = rp_get_basis(unitHandle)
+            ok = rp_get_units_name(unitHandle,unitName)
+            ok = rp_get_units_name(basisHandle,basisName)
+            if (basisHandle .gt. 0) then
+                print *,unitName,"'s basisName = ",basisName
+            else
+                print *,unitName," has no basis"
+            endif
+        else
+            print *,"rp_get_basis FAILED!!!"
+        endif
+      END SUBROUTINE  test_rp_get_basis
+
+      SUBROUTINE  test_rp_units_convert_dbl()
+        integer rp_units_convert_dbl, ok
+        double precision dblRslt
+        ok = rp_units_convert_dbl("72F","C",dblRslt)
+
+        if (ok .eq. 0) then
+            print *, "72F = ",dblRslt,"C"
+        else
+            print *,"rp_units_convert_dbl FAILED!!!"
+        endif
+      END SUBROUTINE  test_rp_units_convert_dbl
+
+      SUBROUTINE  test_rp_units_convert_str()
+        integer rp_units_convert_str, ok
+        character*100 strRslt
+        ok = rp_units_convert_str("72F","C",strRslt)
+
+        if (ok .eq. 0) then
+            print *, "72F = ",strRslt
+        else
+            print *,"rp_units_convert_str FAILED!!!"
+        endif
+      END SUBROUTINE  test_rp_units_convert_str
+
+      program rplib_f_tests
+        IMPLICIT NONE
+
+        CHARACTER*100 inFile
+
+        call getarg(1,inFile)
+
+        print *,"TESTING LIB"
+        call test_rp_lib(inFile)
+
+        print *,"TESTING ELEMENT COMP"
+        call test_rp_lib_element_comp(inFile)
+
+        print *,"TESTING ELEMENT ID"
+        call test_rp_lib_element_id(inFile)
+
+        print *,"TESTING ELEMENT TYPE"
+        call test_rp_lib_element_type(inFile)
+
+        print *,"TESTING ELEMENT OBJ"
+        call test_rp_lib_element_obj(inFile)
+
+        print *,"TESTING CHILDREN"
+        call test_rp_lib_children(inFile)
+
+        print *,"TESTING GET"
+        call test_rp_lib_get(inFile)
+
+        print *,"TESTING PUT STR"
+        call test_rp_lib_put_str(inFile)
+
+        print *,"TESTING NODE COMP"
+        call test_rp_lib_node_comp(inFile)
+
+        print *,"TESTING NODE TYPE"
+        call test_rp_lib_node_type(inFile)
+
+        print *,"TESTING NODE ID"
+        call test_rp_lib_node_id(inFile)
+
+        print *,"TESTING XML"
+        call test_rp_lib_xml(inFile)
+
+        print *,"TESTING RESULT"
+        call test_rp_result(inFile)
+
+        print *,"TESTING UNITS DEFINE UNIT"
+        call test_rp_define_unit()
+
+        print *,"TESTING UNITS FIND"
+        call test_rp_find()
+
+        print *,"TESTING UNITS MAKE METRIC"
+        call test_rp_make_metric()
+
+        print *,"TESTING UNITS GET UNITS"
+        call test_rp_get_units()
+
+        print *,"TESTING UNITS GET UNITS NAME"
+        call test_rp_get_units_name()
+
+        print *,"TESTING UNITS GET EXPONENT"
+        call test_rp_get_exponent()
+
+        print *,"TESTING UNITS GET BASIS"
+        call test_rp_get_basis()
+
+        print *,"TESTING UNITS CONVERT DOUBLE"
+        call test_rp_units_convert_dbl()
+
+        print *,"TESTING UNITS CONVERT STRING"
+        call test_rp_units_convert_str()
+
+      end program rplib_f_tests
Index: /branches/blt4/oldtest/src/RpLibraryC_test.c
===================================================================
--- /branches/blt4/oldtest/src/RpLibraryC_test.c	(revision 2040)
+++ /branches/blt4/oldtest/src/RpLibraryC_test.c	(revision 2040)
@@ -0,0 +1,267 @@
+/*
+ * ======================================================================
+ *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include <stdio.h>
+#include "RpLibraryCInterface.h"
+
+int test_lib(RpLibrary** lib, const char* path);
+int test_element (RpLibrary* lib, const char* path );
+int test_get (RpLibrary* lib, const char* path );
+int test_getString (RpLibrary* lib, const char* path );
+int test_getDouble (RpLibrary* lib, const char* path );
+int test_putString (RpLibrary* lib, 
+                    const char* path, 
+                    const char* value, 
+                    int append );
+int test_putDouble (RpLibrary* lib, 
+                    const char* path, 
+                    double value, 
+                    int append );
+int test_children (RpLibrary* lib, const char* path);
+int test_childrenByType (RpLibrary* lib, const char* path, const char* type );
+
+int test_lib (RpLibrary** lib, const char* path) {
+
+    int retVal = 0;
+
+    *lib = NULL;
+    *lib = rpLibrary(path);
+
+    printf("TESTING LIBRARY: path = %s\n", path);
+
+    if (*lib != NULL) {
+        printf("creation of library successful\n");
+    }
+    else {
+        printf("creation of library failed\n");
+        retVal += 1;
+    }
+
+    printf ("lib = %x\n",(unsigned int)(*lib));
+
+    return retVal;
+}
+
+int test_element (RpLibrary* lib, const char* path )
+{
+    int retVal = 0;
+    RpLibrary* searchEle = NULL;
+    const char* type = NULL;
+    const char* comp = NULL;
+    const char* id = NULL;
+
+    printf("TESTING ELEMENT: path = %s\n", path);
+
+    searchEle = rpElement(lib,path);
+    retVal += rpElementAsType(lib,path,&type);
+    retVal += rpElementAsComp(lib,path,&comp);
+    retVal += rpElementAsId(lib,path,&id);
+
+    if (!searchEle) {
+        printf("searchEle is NULL\n");
+        retVal += 1;
+    }
+    else {
+        printf("searchEle comp = :%s:\n", comp);
+        printf("searchEle   id = :%s:\n", id);
+        printf("searchEle type = :%s:\n", type);
+
+        retVal += rpNodeComp(searchEle,&comp);
+        retVal += rpNodeId(searchEle,&id);
+        retVal += rpNodeType(searchEle,&type);
+
+        printf("searchEle comp = :%s:\n", comp);
+        printf("searchEle   id = :%s:\n", id);
+        printf("searchEle type = :%s:\n", type);
+
+    }
+
+    return retVal;
+}
+
+int test_getString (RpLibrary* lib, const char* path )
+{
+    int retVal = 0;
+    const char* searchVal = NULL;
+
+    printf("TESTING GET String: path = %s\n", path);
+
+    retVal += rpGetString(lib,path,&searchVal);
+
+    if ( (retVal) || !searchVal || *searchVal == '\0') {
+        printf("searchVal is EMPTY STRING\n");
+        retVal += 1;
+    }
+    else {
+        printf("searchVal = :%s:\n", searchVal);
+        retVal = 0;
+    }
+
+    return retVal;
+}
+
+int test_getDouble (RpLibrary* lib, const char* path )
+{
+    int retVal = 0;
+    double searchVal = 0.0;
+
+    printf("TESTING GET Double: path = %s\n", path);
+
+    retVal = rpGetDouble(lib,path,&searchVal);
+
+    if (!retVal) {
+        printf("searchVal = :%f:\n", searchVal);
+    }
+    else {
+        printf("GET Double: FAILED\n");
+    }
+
+    return retVal;
+}
+
+int test_children (RpLibrary* lib, const char* path)
+{
+    int retVal = 0;
+    RpLibrary* childEle = NULL;
+    const char* id = NULL;
+    const char* comp = NULL;
+    const char* type = NULL;
+
+    printf("TESTING CHILDREN: path = %s\n", path);
+
+    while ( (childEle = rpChildren(lib,path,childEle)) ) {
+        retVal += rpNodeComp(childEle,&comp);
+        retVal += rpNodeId(childEle,&id);
+        retVal += rpNodeType(childEle,&type);
+
+        printf("childEle comp = :%s:\n",comp);
+        printf("childEle   id = :%s:\n",id);
+        printf("childEle type = :%s:\n",type);
+    }
+
+    return retVal;
+}
+
+int test_childrenByType (RpLibrary* lib, const char* path, const char* searchType )
+{
+    int retVal = 0;
+    RpLibrary* childEle = NULL;
+    const char* id = NULL;
+    const char* comp = NULL;
+    const char* type = NULL;
+
+    printf("TESTING CHILDREN: path = %s\n", path);
+
+    while ( (childEle = rpChildrenByType(lib,path,childEle,searchType)) ) {
+        retVal += rpNodeComp(childEle,&comp);
+        retVal += rpNodeId(childEle,&id);
+        retVal += rpNodeType(childEle,&type);
+
+        printf("childEle comp = :%s:\n",comp);
+        printf("childEle   id = :%s:\n",id);
+        printf("childEle type = :%s:\n",type);
+    }
+
+    return retVal;
+}
+
+int test_putString (RpLibrary* lib, const char* path, const char* value, int append)
+{
+    int retVal = 0;
+    const char* searchVal = NULL;
+
+    printf("TESTING PUT String: path = %s\n", path);
+
+    retVal += rpPutString(lib,path,value,append);
+    if (!retVal) {
+        retVal += rpGetString(lib, path, &searchVal);
+    }
+
+    if (retVal || !searchVal || *searchVal == '\0') {
+        printf("searchVal is EMPTY STRING, or there was an error\n");
+    }
+    else {
+        printf("searchVal = :%s:\n", searchVal);
+    }
+
+    return retVal;
+}
+
+int test_putDouble (RpLibrary* lib, const char* path, double value, int append)
+{
+    int retVal = 0;
+    double searchVal = 0.0;
+
+    printf("TESTING PUT String: path = %s\n", path);
+
+    retVal += rpPutDouble(lib,path,value,append);
+    if (!retVal) {
+        retVal += rpGetDouble(lib, path,&searchVal);
+    }
+
+    if ( retVal ){
+        printf("ERROR while retrieving searchVal\n");
+    }
+    else {
+        printf("searchVal = :%f:\n", searchVal);
+    }
+
+    return retVal;
+}
+
+int
+main(int argc, char** argv)
+{
+    RpLibrary* lib = NULL;
+    int err = 0;
+    const char* retStr = NULL;
+
+    if (argc < 2)
+    {
+        printf("usage: %s driver.xml\n", argv[0]);
+        return -1;
+    }
+
+    test_lib(&lib,argv[1]);
+
+    test_element(lib,"input.number(min)");
+    test_element(lib,"input.number(max)");
+    test_element(lib,"output.curve(result)");
+
+    test_getString(lib, "input.number(min).default");
+    test_getString(lib, "input.(min).current");
+    test_getString(lib, "input.number(max).current");
+    test_getString(lib, "output.curve.about.label");
+
+    test_putString(lib,"input.number(test).default", "1000", 0);
+    test_putDouble(lib, "input.number(test).preset", 1, 0);
+    test_putDouble(lib, "input.number(test).current", 2000, 0);
+    test_putDouble(lib, "input.number(test).preset(p1)", 100, 0);
+    test_putDouble(lib, "input.number(test).preset(p2)", 200, 0);
+    test_putDouble(lib, "input.number(test).preset(p3)", 300, 0);
+    test_putDouble(lib, "input.number(test).preset(p4)", 400, 0);
+    test_putDouble(lib, "input.number(test).preset(p5)", 500, 0);
+
+
+    test_children(lib,"");
+    test_children(lib,"input.number(test)");
+    test_childrenByType(lib,"input.number(test)","preset");
+
+    err = rpXml(lib,&retStr);
+
+    if ( !err ) {
+        printf("XML = \n%s\n",retStr);
+    }
+    else {
+        printf("rpXML failed\n");
+    }
+
+    rpFreeLibrary(&lib);
+
+    return 0;
+}
Index: /branches/blt4/oldtest/src/RpLibraryF_test.f
===================================================================
--- /branches/blt4/oldtest/src/RpLibraryF_test.f	(revision 2040)
+++ /branches/blt4/oldtest/src/RpLibraryF_test.f	(revision 2040)
@@ -0,0 +1,182 @@
+c ----------------------------------------------------------------------
+c  TEST: Fortran Rappture Library Test Source.
+c
+c  Simple tests of the Rappture Library Fortran Bindings
+c
+c ======================================================================
+c  AUTHOR:  Derrick S. Kearney, Purdue University
+c  Copyright (c) 2004-2005  Purdue Research Foundation
+c
+c  See the file "license.terms" for information on usage and
+c  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+c ======================================================================
+      SUBROUTINE  test_element(lib,path)
+        integer rp_lib_element_obj
+        integer retVal, lib
+        character*100 typ, comp, id, path
+
+        print *,"TESTING ELEMENT: path = ",path
+
+        retVal = rp_lib_element_obj(lib, path)
+
+        print *,"dict key = ",retVal
+
+        ! what happens when you get details for lib?
+        call rp_lib_node_comp(retVal,comp)
+        call rp_lib_node_type(retVal,typ)
+        call rp_lib_node_id(retVal,id)
+
+        print *,"comp = ",comp
+        print *,"type = ",typ
+        print *,"id = ",id
+      END SUBROUTINE  test_element
+
+      SUBROUTINE  test_get(lib,path)
+        integer lib
+        character*100 path, retText
+
+        print *,"TESTING GET       : path = ",path
+
+        call rp_lib_get(lib, path, retText)
+
+        print *,"retText = ",retText
+      END SUBROUTINE  test_get
+
+      SUBROUTINE  test_get_str(lib,path)
+        integer lib
+        character*100 path, retText
+
+        print *,"TESTING GET STRING: path = ",path
+
+        call rp_lib_get_str(lib, path, retText)
+
+        print *,"retText = ",retText
+      END SUBROUTINE  test_get_str
+
+      SUBROUTINE  test_get_dbl(lib,path)
+        integer lib
+        double precision rslt, rp_lib_get_double
+        character*100 path
+
+        print *,"TESTING GET DOUBLE: path = ",path
+
+        rslt = rp_lib_get_double(lib, path)
+
+        print *,"rslt = ",rslt
+      END SUBROUTINE  test_get_dbl
+
+      SUBROUTINE  test_get_int(lib,path)
+        integer lib
+        integer rslt, rp_lib_get_integer
+        character*100 path
+
+        print *,"TESTING GET INTEGER: path = ",path
+
+        rslt = rp_lib_get_integer(lib, path)
+
+        print *,"rslt = ",rslt
+      END SUBROUTINE  test_get_int
+
+      SUBROUTINE  test_get_bool(lib,path)
+        integer lib
+        integer rslt, rp_lib_get_boolean
+        character*100 path
+
+        print *,"TESTING GET BOOLEAN: path = ",path
+
+        rslt = rp_lib_get_boolean(lib, path)
+
+        print *,"rslt = ",rslt
+      END SUBROUTINE  test_get_bool
+
+      program rplib_f_tests
+        IMPLICIT NONE
+
+        integer rp_lib
+
+        integer driver
+        CHARACTER*100 inFile, path
+
+        call getarg(1,inFile)
+        driver = rp_lib(inFile)
+        ! print *,"dict key = ",driver
+
+        ! TESTING ELEMENT
+        path = "input.number(min)"
+        call test_element(driver, path)
+
+        ! TESTING GET
+        path = "input.number(min).current"
+        call test_get(driver, path)
+
+        ! TESTING GET STRING
+        path = "input.number(min).current"
+        call test_get_str(driver, path)
+
+        ! TESTING GET DOUBLE
+        path = "input.number(min).current"
+        call test_get_dbl(driver, path)
+
+        ! TESTING GET INT
+        path = "input.integer(try).current"
+        call rp_lib_put_str(driver, path, "12",0)
+        call test_get_int(driver, path)
+        call rp_lib_put_str(driver, path, "15.043",0)
+        call test_get_int(driver, path)
+
+        ! TESTING GET BOOLEAN
+        path = "input.boolean(b).current"
+        call rp_lib_put_str(driver, path, "true",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "false",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "1",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "0",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "on",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "off",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "yes",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "no",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "t",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "f",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "ye",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "n",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "tr",0)
+        call test_get_bool(driver, path)
+        call rp_lib_put_str(driver, path, "of",0)
+        call test_get_bool(driver, path)
+
+        call rp_result(driver)
+      end program rplib_f_tests
+
+!        call rp_lib_get(driver,
+!     +        "input.number(min).current", strVal)
+!        ok = rp_units_convert_dbl(strVal,"K",T)
+!
+!        call rp_lib_get(driver,
+!     +        "input.number(Ef).current", strVal)
+!        ok = rp_units_convert_dbl(strVal,"K",Ef)
+!
+!        kT = 8.61734e-5 * T
+!        Emin = Ef - 10*kT
+!        Emax = Ef + 10*kT
+!
+!        dE = 0.005*(Emax - Emin)
+!
+!        do 10 E=Emin,Emax,dE
+!          f = 1.0/(1.0+exp((E-Ef)/kT))
+!          write(xy,'(E20.12,F13.9,A)') f, E, char(10)
+!          call rp_lib_put_str(driver,
+!     +        "output.curve(f12).component.xy", xy, 1)
+! 10     continue
+!
+!      end program rplib_f_tests
Index: /branches/blt4/oldtest/src/RpLibrary_test.cc
===================================================================
--- /branches/blt4/oldtest/src/RpLibrary_test.cc	(revision 2040)
+++ /branches/blt4/oldtest/src/RpLibrary_test.cc	(revision 2040)
@@ -0,0 +1,591 @@
+/**
+ *
+ * RpParser_test.c
+ *
+ * test file for the RpParser.so library based off of the scew
+ * libaray, a simple wrapper around the expat parser
+ *
+ * Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ * See the file "license.terms" for information on usage and
+ * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#include "RpLibrary.h"
+#include <list>
+#include <string>
+#include <iostream>
+
+using namespace std;
+
+int test_element (RpLibrary* lib, string path);
+int test_parent (RpLibrary* lib, string path);
+int test_get (RpLibrary* lib, string path);
+int test_getString (RpLibrary* lib, string path);
+int test_getDouble (RpLibrary* lib, string path);
+int test_getInt (RpLibrary* lib, string path);
+int test_getBool (RpLibrary* lib, string path);
+int test_putObj (RpLibrary* fromLib, string fromPath,
+                 RpLibrary* toLib, string toPath);
+int test_copy (RpLibrary* fromLib, string fromPath,
+               RpLibrary* toLib, string toPath);
+int test_remove (RpLibrary* lib, string path);
+
+int test_element (RpLibrary* lib, string path)
+{
+    int retVal = 1;
+    RpLibrary* searchEle = lib->element(path);
+
+    cout << "TESTING ELEMENT: path = " << path << endl;
+
+    if (!searchEle) {
+        cout << "searchEle is NULL" << endl;
+        retVal = 1;
+    }
+    else {
+        cout << "searchEle path = :" << searchEle->nodePath() << ":" << endl;
+        cout << "searchEle comp = :" << searchEle->nodeComp() << ":" << endl;
+        cout << "searchEle   id = :" << searchEle->nodeId()   << ":" << endl;
+        cout << "searchEle type = :" << searchEle->nodeType() << ":" << endl;
+        retVal = 0;
+    }
+
+    return retVal;
+}
+
+int test_parent (RpLibrary* lib, string path)
+{
+    int retVal = 1;
+    RpLibrary* searchEle = lib->parent(path);
+
+    cout << "TESTING PARENT: path = " << path << endl;
+
+    if (!searchEle) {
+        cout << "searchEle is NULL" << endl;
+        retVal = 1;
+    } else {
+        cout << "searchParent path = :" << searchEle->nodePath() << ":" << endl;
+        cout << "searchParent comp = :" << searchEle->nodeComp() << ":" << endl;
+        cout << "searchParent   id = :" << searchEle->nodeId()   << ":" << endl;
+        cout << "searchParent type = :" << searchEle->nodeType() << ":" << endl;
+        retVal = 0;
+    }
+
+    return retVal;
+}
+
+int test_get (RpLibrary* lib, string path)
+{
+    int retVal = 1;
+    string searchVal = lib->get(path);
+
+    cout << "TESTING GET       : path = " << path << endl;
+
+    if (searchVal.empty()) {
+        cout << "searchVal is EMPTY STRING" << endl;
+        retVal = 1;
+    }
+    else {
+        cout << "searchVal = :" << searchVal << ":" << endl;
+        retVal = 0;
+    }
+
+    return retVal;
+}
+
+int test_getString (RpLibrary* lib, string path)
+{
+    int retVal = 1;
+    string searchVal = lib->getString(path);
+
+    cout << "TESTING GET String: path = " << path << endl;
+
+    if (searchVal.empty()) {
+        cout << "searchVal is EMPTY STRING" << endl;
+        retVal = 1;
+    }
+    else {
+        cout << "searchVal = :" << searchVal << ":" << endl;
+        retVal = 0;
+    }
+
+    return retVal;
+}
+
+int test_getDouble (RpLibrary* lib, string path)
+{
+    int retVal = 1;
+    double searchVal = lib->getDouble(path);
+
+    cout << "TESTING GET Double: path = " << path << endl;
+
+    cout << "searchVal = :" << searchVal << ":" << endl;
+    retVal = 0;
+
+    return retVal;
+}
+
+int test_getInt (RpLibrary* lib, string path)
+{
+    int retVal = 1;
+    int searchVal = lib->getInt(path);
+
+    cout << "TESTING GET INT: path = " << path << endl;
+
+    cout << "searchVal = :" << searchVal << ":" << endl;
+    retVal = 0;
+
+    return retVal;
+}
+
+int 
+test_getBool (RpLibrary* lib, string path)
+{
+    int retVal = 1;
+    bool searchVal = lib->getBool(path);
+
+    cout << "TESTING GET Bool: path = " << path << endl;
+
+    cout << "searchVal = :" << searchVal << ":" << endl;
+    retVal = 0;
+
+    return retVal;
+}
+
+int 
+test_putObj (   RpLibrary* fromLib, string fromPath,
+                    RpLibrary* toLib, string toPath)
+{
+    int retVal = 1;
+    RpLibrary* fromEle = fromLib->element(fromPath);
+    RpLibrary* foundEle = NULL;
+    string newNodeName = "";
+
+    cout << "TESTING PUT Object:" << endl;
+    cout << "fromPath = " << fromPath << endl;
+    cout << "toPath = " << toPath << endl;
+
+    // put the element into the new library/xmltree
+    toLib->put(toPath,fromEle);
+
+    // check the result
+    // create the name of where the element should be
+    newNodeName = toPath + "." + fromEle->nodeComp();
+    // grab the element
+    if ((foundEle = toLib->element(newNodeName))){
+        cout << "SUCCESS: foundEle was found" << endl;
+        retVal = 0;
+    }
+
+    return retVal;
+}
+
+int test_copy (   RpLibrary* fromLib, string fromPath,
+                    RpLibrary* toLib, string toPath)
+{
+    int retVal = 1;
+    RpLibrary* fromEle = fromLib->element(fromPath);
+    RpLibrary* foundEle = NULL;
+    string newNodeName = "";
+
+    cout << "TESTING COPY:" << endl;
+    cout << "fromPath = " << fromPath << endl;
+    cout << "toPath = " << toPath << endl;
+
+    // put the element into the new library/xmltree
+    toLib->copy(toPath,fromPath);
+
+    // check the result
+    // create the name of where the element should be
+    newNodeName = toPath + "." + fromEle->nodeComp();
+    // grab the element
+    if ((foundEle = toLib->element(newNodeName))){
+        cout << "SUCCESS: foundEle was found" << endl;
+        retVal = 0;
+    }
+    else {
+        cout << "FAILURE: foundEle WAS NOT found" << endl;
+    }
+
+    return retVal;
+}
+
+int test_remove (RpLibrary* lib, string path)
+{
+    RpLibrary* getRslt = NULL;
+    int retVal = 1;
+    cout << "TESTING REMOVE:" << endl;
+    // cout << "lib's xml:" << endl << lib->xml() << endl;
+    if (lib) {
+        lib->remove(path);
+        if (lib) {
+            getRslt = lib->element(path);
+            if (getRslt) {
+                cout << "FAILURE: " << path << " not removed" << endl;
+                cout << "lib's xml:" << endl << lib->xml() << endl;
+            }
+            else {
+                cout << "SUCCESS: " << path << " removed" << endl;
+                retVal = 0;
+            }
+        }
+    }
+
+    return retVal;
+}
+
+int test_entities (RpLibrary* lib)
+{
+    list<string>::iterator iter;
+    list<string> elist = lib->entities();
+
+    iter = elist.begin();
+
+    cout << "TESTING ENTITIES BEGIN" << endl;
+    cout << "path = "<< lib->nodePath() << endl;
+
+    while (iter != elist.end() ) {
+        cout << *iter << endl;
+        iter++;
+    }
+
+    cout << "TESTING ENTITIES END" << endl;
+
+    return 0;
+}
+
+int test_diff (RpLibrary* lib1, RpLibrary* lib2)
+{
+    list<string>::iterator iter;
+    list<string> elist;
+
+    elist = lib1->diff(lib2,"input");
+
+    iter = elist.begin();
+
+    cout << "TESTING DIFF BEGIN" << endl;
+
+    int count = 0;
+    while (iter != elist.end() ) {
+        cout << *iter << " ";
+        iter++;
+        count++;
+        if (count == 4) {
+            cout << endl;
+            count = 0;
+        }
+
+    }
+
+    cout << "TESTING DIFF END" << endl;
+
+    return 0;
+}
+
+/*
+int test_children (RpLibrary* lib, string path, string type )
+{
+    int retVal = 1;
+    int childNum = -1;
+
+    cout << "TESTING CHILDREN: path = " << path << endl;
+    RpLibrary** searchEle = lib->children(path,"",type);
+
+    if (!searchEle || !*searchEle) {
+        cout << "searchEle is NULL -> NO CHILDREN" << endl;
+        retVal = 1;
+    }
+    else {
+
+        while (searchEle[++childNum]) {
+            cout << "searchEle comp = :" << searchEle[childNum]->nodeComp() 
+                << ":" << endl;
+            cout << "searchEle   id = :" << searchEle[childNum]->nodeId()   
+                << ":" << endl;
+            cout << "searchEle type = :" << searchEle[childNum]->nodeType() 
+                << ":" << endl;
+            delete (searchEle[childNum]);
+            searchEle[childNum] = NULL;
+        }
+
+        retVal = 0;
+
+    }
+
+    delete[] searchEle;
+
+    return retVal;
+}
+*/
+
+int test_children (RpLibrary* lib, string path, string type )
+{
+    int retVal = 1;
+    RpLibrary* childEle = NULL;
+
+    cout << "TESTING CHILDREN: path = " << path << endl;
+
+    while ( (childEle = lib->children(path,childEle,type)) ) {
+
+        cout << "childEle path = :" << childEle->nodePath() 
+            << ":" << endl;
+        cout << "childEle comp = :" << childEle->nodeComp() 
+            << ":" << endl;
+        cout << "childEle   id = :" << childEle->nodeId()   
+            << ":" << endl;
+        cout << "childEle type = :" << childEle->nodeType() 
+            << ":" << endl;
+
+        retVal = 0;
+
+    }
+
+    if (!childEle) {
+        cout << "No more children" << endl;
+    }
+
+    return retVal;
+}
+
+int
+main(int argc, char** argv)
+{
+    RpLibrary* lib = NULL;
+    RpLibrary lib2;
+
+    if (argc < 2)
+    {
+        printf("usage: RpLibrary_test infile.xml\n");
+        return EXIT_FAILURE;
+    }
+
+    lib = new RpLibrary(string(argv[1]));
+
+    test_element(lib,"");
+    test_element(lib,"input.number(min)");
+    test_element(lib,"input.number(max)");
+    test_element(lib,"output.curve(result)");
+
+    test_parent(lib,"input.number(min).current");
+    test_parent(lib,"input.number(max)");
+    test_parent(lib,"output");
+
+    test_getString(lib, "input.number(min).default");
+    test_getString(lib, "input.(min).current");
+    test_getString(lib, "input.number(max).current");
+    test_getString(lib, "output.curve.about.label");
+
+    lib->put("input.number(test_one).default", "3000");
+    test_get(lib, "input.number(test_one).default");
+    lib->put("input.number(test).default", "1000");
+    test_getString(lib, "input.number(test).default");
+    lib->put("input.number(test).current", 2000);
+    test_getDouble(lib, "input.number(test).current");
+
+    lib->put("input.number(test).current", 5);
+    test_getInt(lib, "input.number(test).current");
+    lib->put("input.number(test).current", 50);
+    test_getInt(lib, "input.number(test).current");
+    lib->put("input.number(test).current", 53.6);
+    test_getInt(lib, "input.number(test).current");
+    lib->put("input.number(test).current", 52.94);
+    test_getInt(lib, "input.number(test).current");
+
+    lib->put("input.boolean(boolval).current", "yes");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "no");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "true");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "false");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "on");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "off");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "1");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "0");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "ye");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "n");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "tr");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "fa");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "on");
+    test_getBool(lib, "input.boolean(boolval).current");
+    lib->put("input.boolean(boolval).current", "of");
+    test_getBool(lib, "input.boolean(boolval).current");
+
+    test_putObj(lib, "input.number(max)", lib, "input.test");
+    test_copy(lib, "input.number(min)", lib, "input.test.number(min)");
+
+    test_children(lib,"","");
+    test_children(lib,"input.number(test)","");
+    test_children(lib,"input","");
+    test_children(lib,"input","number");
+
+    cout << lib->xml() << endl;
+
+    RpLibrary* remEle = lib->element("input.test.(min)");
+    test_remove(remEle,"");
+    remEle->remove();
+    test_remove(lib, "input.test.(min)");
+    test_remove(lib, "input.test.(max)");
+    cout << lib->xml() << endl;
+
+    RpLibrary* libInput = lib->element("input");
+    test_entities(lib);
+    test_entities(libInput);
+
+    /*
+    list<string> l1 = lib->value("input.number(min)");
+    list<string> l2 = lib->value("input.number(max)");
+    cout << "l1 = " << l1.front() << " " << l1.back() << endl;
+    cout << "l2 = " << l2.front() << " " << l2.back() << endl;
+    */
+
+    RpLibrary* dlib1 = new RpLibrary(string(argv[1]));
+    RpLibrary* dlib2 = new RpLibrary(string(argv[1]));
+    test_diff(dlib1,dlib2);
+    cout << "dlib1-------------------------------------" << endl;
+    cout << dlib1->xml() << endl;
+    cout << "dlib2-------------------------------------" << endl;
+    cout << dlib1->xml() << endl;
+    dlib1 = lib;
+    test_diff(dlib1,dlib2);
+    cout << "dlib1-------------------------------------" << endl;
+    cout << dlib1->xml() << endl;
+    cout << "dlib2-------------------------------------" << endl;
+    cout << dlib2->xml() << endl;
+
+
+
+    // test copy assignment operator
+    lib2 = *lib;
+
+    delete lib;
+
+    lib2.put("input.output.curve(curve1).xy.default", "1e-4 0.0\n");
+    lib2.put("input.output.curve(curve1).xy.default", "1e-2 1.0\n","",1);
+    lib2.put("input.output.curve(curve1).xy.default", "1e-30 2.0\n","",1);
+    lib2.put("input.output.curve(curve1).xy.default", "1e+4 3.0\n","",1);
+    lib2.put("input.output.curve(curve1).xy.default", "1.7e-4 4.0\n","",1);
+    lib2.put("input.output.curve(curve1).xy.default", "15e-4 5.0\n","",1);
+
+
+    // test copy constructor
+    RpLibrary lib3 = lib2;
+
+    lib2.put("input.output.curve(curve2).xy.current", "1e-4 0.0\n");
+    lib2.put("input.output.curve(curve2).xy.current", "1e-2 1.0\n","",1);
+    lib2.put("input.output.curve(curve2).xy.current", "1e-30 2.0\n","",1);
+    lib2.put("input.output.curve(curve2).xy.current", "1e+4 3.0\n","",1);
+    lib2.put("input.output.curve(curve2).xy.current", "1.7e-4 4.0\n","",1);
+    lib2.put("input.output.curve(curve2).xy.current", "15e-4 5.0\n","",1);
+
+
+    cout << "//////////////////// LIB 2 ////////////////////" << endl;
+    cout << lib2.xml() << endl;
+    cout << "//////////////////// LIB 3 ////////////////////" << endl;
+    cout << lib3.xml() << endl;
+
+    lib2.result();
+
+
+    cout << "testing with &lt;number&gt;" << endl;
+    lib2.put("input.dsk.test", "slkdjfs slkdfj lks &lt;number&gt; sdlkfj sdlkjf","",1);
+    cout << lib2.xml() << endl;
+    cout << "testing get &lt;number&gt;" << endl;
+    cout << lib2.get("input.dsk.test") << endl;
+    cout << "testing with <number>" << endl;
+    lib2.put("input.dsk.test2", "slkdjfs slkdfj lks <number> sdlkfj sdlkjf","",1);
+    cout << lib2.xml() << endl;
+
+    /*
+    RpLibrary* childEle  = NULL;
+    RpLibrary* childEle2 = NULL;
+    while ( (childEle = lib2.children("input",childEle)) ) {
+        cout << "childEle path = :" << childEle->nodePath() << ":" << endl;
+        while ( (childEle2 = childEle->children("",childEle2)) ) {
+            cout << "childEle2 path = :" << childEle2->nodePath() << ":" << endl;
+        }
+        childEle2 = NULL;
+        if (!childEle) {
+            cout << "childEle Not null" << endl;
+        }
+    }
+    */
+
+    return 0;
+}
+
+    /*
+    put(lib, "element3.sub_element(value3)", "put_element3", NULL, 1);
+    
+    search_element = _find(lib->element,"element3.sub_element(value3)",0);
+    printf("search_element name = %s\n", scew_element_name(search_element));
+
+    // search_element2 = element(root->element, "element3.sub_element(value3)", "object");
+
+    search_element2 = element(lib, "element3.sub_element(value3)", OBJECT);
+    printf("search_element2 name = %s\n", scew_element_name(search_element2->element));
+    freeRpLibrary(&search_element2);
+
+    search_element2 = element(lib, "element3.sub_element(value3)", COMPONENT);
+    printf("search_element2 comp = %s\n", search_element2->stringVal);
+    freeRpLibrary(&search_element2);
+    
+    search_element2 = element(lib, "element3.sub_element(value3)", ID);
+    printf("search_element2 id = %s\n", search_element2->stringVal);
+    freeRpLibrary(&search_element2);
+    
+    search_element2 = element(lib, "element3.sub_element(value3)", TYPE);
+    printf("search_element2 type = %s\n", search_element2->xml_char);
+    freeRpLibrary(&search_element2);
+    
+    
+    get_element = get(lib, "element");
+    printf("get element's contents = %s\n", get_element->xml_char);
+    freeRpLibrary(&get_element);
+
+
+        
+    put(lib, "element4.sub_element(value)", "put1_element", NULL, 0);
+    put(lib, "element4.sub_element(value2)", "put2_element", NULL, 0);
+    put(lib, "element4.sub_element(value3)", "put3_element", NULL, 0);
+    put(lib, "element4.sub_element(value4)", "put4_element", NULL, 0);
+    get_element = get(lib, "element4.sub_element(value)");
+    printf("put1 element's contents = %s\n", get_element->xml_char);
+    get_element = get(lib, "element4.sub_element(value2)");
+    printf("put2 element's contents = %s\n", get_element->xml_char);
+    get_element = get(lib, "element4.sub_element(value3)");
+    printf("put3 element's contents = %s\n", get_element->xml_char);
+    get_element = get(lib, "element4.sub_element(value4)");
+    printf("put4 element's contents = %s\n", get_element->xml_char);
+
+    */
+    /**
+     * Save an XML tree to a file.
+     */
+    /*
+    if (!scew_writer_tree_file(lib->tree, argv[2]))
+    {
+        printf("Unable to create %s\n", argv[2]);
+        return EXIT_FAILURE;
+    }
+    */
+
+
+    /*
+    
+    freeRpLibrary(&search_element2);
+    freeRpLibrary(&get_element);
+    freeRpLibrary(&lib);
+
+    if (tagName) { free (tagName); }
+    if (id) { free(id); }
+    */
Index: /branches/blt4/oldtest/src/RpMatlab_test.m
===================================================================
--- /branches/blt4/oldtest/src/RpMatlab_test.m	(revision 2040)
+++ /branches/blt4/oldtest/src/RpMatlab_test.m	(revision 2040)
@@ -0,0 +1,64 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+%op = sprintf('%s:%s:%s', path, 'src', 'src/matlab//');
+%op = path(op);
+
+% before you run this script you need to manually start up matlab and
+% add the src and src/matlab directories to your path
+% 
+% or do this:
+%
+% cd test
+% matlab -nodisplay -r path\(path,\'src\'\),path\(path,\'src\/matlab\'\),infile=\'rplib_test.xml\',RpMatlab_test
+
+%path(path,src');
+%path(path,'src/matlab');
+
+lib = rpLib(infile);
+err = test_element(lib,'input.number(min)');
+err = test_element_comp(lib,'input.number(min)');
+err = test_children(lib,'input');
+err = test_children_bytype(lib,'input','number');
+err = test_convert('1m','cm',0);
+err = test_convert('1m','cm',1);
+err = test_convert('1eV','J',1);
+err = test_convert_dbl('1eV','J');
+err = test_convert_str('1eV','J',0);
+err = test_convert_str('1eV','J',1);
+err = test_define_unit('We',0);
+err = test_define_unit('We2',0);
+err = test_find('We');
+err = test_get(lib,'output.curve(result).about.label');
+err = test_get_string(lib,'output.curve(result).about.label');
+err = test_get_basis('cm');
+err = test_get_basis('We');
+err = test_get_double(lib,'input.number(max).current');
+err = test_get_exponent('cm');
+err = test_get_exponent('We2');
+err = test_get_units('We2');
+err = test_get_units_name('We2');
+err = test_make_metric('We2');
+err = test_node_comp(lib,'input.number(min)');
+%err = test_node_comp(0,'input.nur(min)');
+err = test_node_id(lib,'input.number(min)');
+err = test_node_type(lib,'input.number(min)');
+err = test_put(lib,'output.curve(result).xy(f12)','12 13',1);
+err = test_put_dbl(lib,'output.curve(result).xy(f13)',22,1);
+err = test_put_dbl(lib,'output.curve(result).xy(f14)',0,1);
+err = test_put_str(lib,'output.curve(result).xy(f15)','110 111',1);
+err = test_xml(lib);
+err = test_result(lib);
+
+quit;
Index: /branches/blt4/oldtest/src/RpNumber_test.cc
===================================================================
--- /branches/blt4/oldtest/src/RpNumber_test.cc	(revision 2040)
+++ /branches/blt4/oldtest/src/RpNumber_test.cc	(revision 2040)
@@ -0,0 +1,152 @@
+/*
+ * ======================================================================
+ *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include "RpNumber.h"
+
+int test_getPath(RpNumber* myNumber);
+int test_getUnits(RpNumber* myNumber);
+int test_getDefaultValue(RpNumber* myNumber);
+int test_getCurrentValue(RpNumber* myNumber);
+int test_getMin(RpNumber* myNumber);
+int test_getMax(RpNumber* myNumber);
+int test_getLabel(RpNumber* myNumber);
+int test_getDesc(RpNumber* myNumber);
+int test_convert(RpNumber* myNumber);
+
+int test_getPath(RpNumber* myNumber)
+{
+    std::cout << "Path " << myNumber->getPath() << std::endl;
+
+    return 1;
+}
+
+int test_getUnits(RpNumber* myNumber)
+{
+    std::cout << "units " << myNumber->getUnits() << std::endl;
+
+    return 1;
+}
+
+int test_getDefaultValue(RpNumber* myNumber)
+{
+    std::cout << "defaultVal " << myNumber->getDefaultValue() << std::endl;
+
+    return 1;
+}
+
+int test_getCurrentValue(RpNumber* myNumber)
+{
+    std::cout << "currentVal " << myNumber->getCurrentValue() << std::endl;
+
+    return 1;
+}
+
+int test_getMin(RpNumber* myNumber)
+{
+    std::cout << "min " << myNumber->getMin() << std::endl;
+
+    return 1;
+}
+
+int test_getMax(RpNumber* myNumber)
+{
+    std::cout << "max " << myNumber->getMax() << std::endl;
+
+    return 1;
+}
+
+int test_getLabel(RpNumber* myNumber)
+{
+    std::cout << "label " << myNumber->getLabel() << std::endl;
+
+    return 1;
+}
+
+int test_getDesc(RpNumber* myNumber)
+{
+    std::cout << "desc " << myNumber->getDesc() << std::endl;
+
+    return 1;
+}
+
+int test_convert(RpNumber* myNumber)
+{
+    int result = 0;
+    double newVal = myNumber->convert("C",1,&result);
+
+    if (result) {
+        std::cout << "newVal = " << newVal << std::endl;
+    }
+    else {
+        std::cout << "newVal has a bad result" << std::endl;
+    }
+
+    return result;
+}
+
+void define_some_units()
+{
+    const RpUnits * meters = RpUnits::define("m", NULL);
+    RpUnits::makeMetric(meters);
+    RpUnits::define("V", NULL);
+    RpUnits::define("s", NULL);
+    RpUnits::define("cm2/Vs", NULL);
+    const RpUnits* angstrom = RpUnits::define("A", NULL);
+    RpUnits::define(angstrom, meters, angstrom2meter, meter2angstrom);
+    const RpUnits* fahrenheit = RpUnits::define("F", NULL);
+    const RpUnits* celcius = RpUnits::define("C", NULL);
+    const RpUnits* kelvin = RpUnits::define("K", NULL);
+    RpUnits::define(fahrenheit, celcius, fahrenheit2centigrade, centigrade2fahrenheit);
+    RpUnits::define(celcius, kelvin, centigrade2kelvin, kelvin2centigrade);
+}
+
+
+int main ()
+{
+
+    define_some_units();
+
+    RpNumber* T1 = new RpNumber("input.(ambient).(temperature)","K",300.00);
+    RpNumber* T2 = new RpNumber("input.(ambient).(temperature)",
+                                "K",
+                                300.00,
+                                0.00,
+                                1000.00,
+                                "Temperature",
+                                "Ambient Temperature, value between 0 and 1000"
+                                );
+    
+
+    test_getPath(T1);
+    test_getUnits(T1);
+    test_getDefaultValue(T1);
+    test_getCurrentValue(T1);
+    test_getMin(T1);
+    test_getMax(T1);
+    test_getLabel(T1);
+    test_getDesc(T1);
+    test_convert(T1);
+    test_getCurrentValue(T1);
+    test_getUnits(T1);
+
+    std::cout << std::endl;
+
+    test_getPath(T2);
+    test_getUnits(T2);
+    test_getDefaultValue(T2);
+    test_getCurrentValue(T2);
+    test_getMin(T2);
+    test_getMax(T2);
+    test_getLabel(T2);
+    test_getDesc(T2);
+    test_convert(T2);
+
+    std::cout << std::endl;
+
+    return 0;
+}
Index: /branches/blt4/oldtest/src/RpOctave_test.m
===================================================================
--- /branches/blt4/oldtest/src/RpOctave_test.m	(revision 2040)
+++ /branches/blt4/oldtest/src/RpOctave_test.m	(revision 2040)
@@ -0,0 +1,52 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+op = sprintf("%s:%s", path(), 'src/octave//');
+op = path(op);
+
+infile = sprintf("%s",argv(1,:));
+lib = rpLib(infile);
+err = test_element(lib,'input.number(min)');
+err = test_element_comp(lib,'input.number(min)');
+err = test_children(lib,'input');
+err = test_children_bytype(lib,'input','number');
+err = test_convert('1m','cm',0);
+err = test_convert('1m','cm',1);
+err = test_convert('1eV','J',1);
+err = test_convert_dbl('1eV','J');
+err = test_convert_str('1eV','J',0);
+err = test_convert_str('1eV','J',1);
+err = test_define_unit('We',0);
+err = test_define_unit('We2',0);
+err = test_find('We');
+err = test_get(lib,'output.curve(result).about.label');
+err = test_get_string(lib,'output.curve(result).about.label');
+err = test_get_basis('cm');
+err = test_get_basis('We');
+err = test_get_double(lib,'input.number(max).current');
+err = test_get_exponent('cm');
+err = test_get_exponent('We2');
+err = test_get_units('We2');
+err = test_get_units_name('We2');
+err = test_make_metric('We2');
+err = test_node_comp(lib,'input.number(min)');
+%err = test_node_comp(0,'input.nur(min)');
+err = test_node_id(lib,'input.number(min)');
+err = test_node_type(lib,'input.number(min)');
+err = test_put(lib,'output.curve(result).xy(f12)','12 13',1);
+err = test_put_dbl(lib,'output.curve(result).xy(f13)',22,1);
+err = test_put_dbl(lib,'output.curve(result).xy(f14)',0,1);
+err = test_put_str(lib,'output.curve(result).xy(f15)','110 111',1);
+err = test_xml(lib);
+err = test_result(lib);
Index: /branches/blt4/oldtest/src/RpString_test.cc
===================================================================
--- /branches/blt4/oldtest/src/RpString_test.cc	(revision 2040)
+++ /branches/blt4/oldtest/src/RpString_test.cc	(revision 2040)
@@ -0,0 +1,145 @@
+/*
+ * ======================================================================
+ *  AUTHOR: Derrick S. Kearney, Purdue University
+ *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include "RpString.h"
+
+int test_setPath(RpString* myString);
+int test_setDefaultValue(RpString* myString);
+int test_setCurrentValue(RpString* myString);
+int test_setSize(RpString* myString);
+int test_setHeight(RpString* myString);
+int test_setWidth(RpString* myString);
+int test_setLabel(RpString* myString);
+int test_setDesc(RpString* myString);
+
+int test_setPath(RpString* myString)
+{
+    std::cout << "Path " << myString->getPath() << std::endl;
+    myString->setPath("input.(ambiant)");
+    std::cout << "Path " << myString->getPath() << std::endl;
+
+    return 1;
+}
+
+int test_setSize(RpString* myString)
+{
+    std::cout << "Size " << myString->getSize() << std::endl;
+    myString->setSize("5x3");
+    std::cout << "Size " << myString->getSize() << std::endl;
+
+    return 1;
+}
+
+int test_setDefaultValue(RpString* myString)
+{
+    std::cout << "defaultVal " << myString->getDefaultValue() << std::endl;
+    myString->setDefaultValue("new default value");
+    std::cout << "defaultVal " << myString->getDefaultValue() << std::endl;
+
+    return 1;
+}
+
+int test_setCurrentValue(RpString* myString)
+{
+    std::cout << "currentVal " << myString->getCurrentValue() << std::endl;
+    myString->setCurrentValue("new current value");
+    std::cout << "currentVal " << myString->getCurrentValue() << std::endl;
+
+    return 1;
+}
+
+int test_setHeight(RpString* myString)
+{
+    std::cout << "Height " << myString->getHeight() << std::endl;
+    myString->setHeight(2);
+    std::cout << "Height " << myString->getHeight() << std::endl;
+
+    return 1;
+}
+
+int test_setWidth(RpString* myString)
+{
+    std::cout << "width " << myString->getWidth() << std::endl;
+    myString->setWidth(1);
+    std::cout << "width " << myString->getWidth() << std::endl;
+
+    return 1;
+}
+
+int test_setLabel(RpString* myString)
+{
+    std::cout << "label " << myString->getLabel() << std::endl;
+    myString->setLabel("newLabel");
+    std::cout << "label " << myString->getLabel() << std::endl;
+
+    return 1;
+}
+
+int test_setDesc(RpString* myString)
+{
+    std::cout << "desc " << myString->getDesc() << std::endl;
+    myString->setDesc("new description");
+    std::cout << "desc " << myString->getDesc() << std::endl;
+
+    return 1;
+}
+
+int main ()
+{
+
+    RpString* T1 = new RpString("input.(ambient).(temperature)","default-string");
+    RpString* T2 = new RpString("input.(ambient).(temperature)",
+                                "default-string",
+                                "15x20");
+    RpString* T3 = new RpString("input.(ambient).(temperature)",
+                                "default-string",
+                                "100x200",
+                                "string3's label",
+                                "string3's desc"
+                                );
+    
+
+    std::cout << "T1 run" << std::endl;
+    test_setPath(T1);
+    test_setDefaultValue(T1);
+    test_setCurrentValue(T1);
+    test_setSize(T1);
+    test_setHeight(T1);
+    test_setWidth(T1);
+    test_setLabel(T1);
+    test_setDesc(T1);
+
+    std::cout << std::endl;
+
+    std::cout << "T2 run" << std::endl;
+    test_setPath(T2);
+    test_setDefaultValue(T2);
+    test_setCurrentValue(T2);
+    test_setSize(T2);
+    test_setHeight(T2);
+    test_setWidth(T2);
+    test_setLabel(T2);
+    test_setDesc(T2);
+
+    std::cout << std::endl;
+
+    std::cout << "T3 run" << std::endl;
+    test_setPath(T3);
+    test_setDefaultValue(T3);
+    test_setCurrentValue(T3);
+    test_setSize(T3);
+    test_setHeight(T3);
+    test_setWidth(T3);
+    test_setLabel(T3);
+    test_setDesc(T3);
+
+    std::cout << std::endl;
+
+    return 0;
+}
Index: /branches/blt4/oldtest/src/RpUnitsC_test.c
===================================================================
--- /branches/blt4/oldtest/src/RpUnitsC_test.c	(revision 2040)
+++ /branches/blt4/oldtest/src/RpUnitsC_test.c	(revision 2040)
@@ -0,0 +1,185 @@
+//----------------------------------------------------------------------
+// TEST: Cee's interface to RpUnits.
+//
+// Basic units conversion tests for the RpUnits portion of Rappture
+// written in Cee.
+//======================================================================
+// AUTHOR:  Derrick Kearney, Purdue University
+// Copyright (c) 2004-2005  Purdue Research Foundation
+//
+// See the file "license.terms" for information on usage and
+// redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+//======================================================================
+//
+#include "RpUnitsCInterface.h"
+#include <stdio.h>
+
+double fahrenheit2centigrade (double F);
+double centigrade2fahrenheit (double C);
+double centigrade2kelvin (double C);
+double kelvin2centigrade (double K);
+
+double angstrom2meter (double angstrom)
+{
+    return angstrom*1.0e-10;
+}
+
+double meter2angstrom (double meters)
+{
+    return meters*1.0e10;
+}
+
+double fahrenheit2centigrade (double F)
+{
+    return ((F-32.0)/(9.0/5.0));
+}
+
+double centigrade2fahrenheit (double C)
+{
+    return ((C*(9.0/5.0))+32.0);
+}
+
+double centigrade2kelvin (double C)
+{
+    return (C+273.15);
+}
+
+double kelvin2centigrade (double K)
+{
+    return (K-273.15);
+}
+
+int main()
+{
+
+    const RpUnits* meters = rpDefineUnit("m",NULL);
+
+    const RpUnits* centimeters = NULL;
+    const RpUnits* nanometers = NULL;
+    const RpUnits* cm_basis = NULL;
+
+    const RpUnits* angstrom = rpDefineUnit("A",NULL);
+    const RpUnits* fahrenheit = rpDefineUnit("F",NULL);
+    const RpUnits* celcius = rpDefineUnit("C",NULL);
+    const RpUnits* kelvin = rpDefineUnit("K",NULL);
+
+    rpDefineConv(angstrom, meters, angstrom2meter, meter2angstrom);
+    rpDefineConv(fahrenheit, celcius, fahrenheit2centigrade, centigrade2fahrenheit);
+    rpDefineConv(celcius, kelvin, centigrade2kelvin, kelvin2centigrade);
+
+
+    double cm_exp = 0;
+    double nm_conv = 0;
+    double value = 0;
+
+    int result = 0;
+    int showUnits = 0;
+
+    const char* nm_conv_str = NULL;
+    const char* retStr = NULL;
+
+    rpMakeMetric(meters);
+    centimeters = rpFind("cm");
+
+    if (meters) {
+        printf("meters sign is :%s:\n",rpGetUnitsName(meters));
+    }
+
+    if (centimeters) {
+        cm_exp = rpGetExponent(centimeters);
+        cm_basis = rpGetBasis(centimeters);
+
+        printf("centimeters sign is :%s:\n",rpGetUnits(centimeters));
+        printf("cm_exp is :%f:\n",cm_exp);
+
+        if (cm_basis) {
+            printf("cm_basis sign is :%s:\n",rpGetUnitsName(cm_basis));
+        }
+        else {
+            printf("cm_basis is NULL\n");
+        }
+
+    }
+
+    nanometers = rpFind("nm");
+
+    if (nanometers) {
+
+        nm_conv = rpConvert_ObjDbl(nanometers,meters,1.0e9,&result);
+        printf("1.0e9 nm = %f m\tresult = %d\n",nm_conv,result);
+
+        nm_conv = rpConvert_ObjDbl(nanometers,meters,1.0e9, NULL);
+        printf("1.0e9 nm = %f m\n",nm_conv);
+
+        showUnits = 1;
+        nm_conv_str = rpConvert_ObjStr(nanometers,meters,1.588e9,showUnits,NULL);
+        printf("1.588e9 nm = %s\n",nm_conv_str);
+
+        showUnits = 0;
+        nm_conv_str = rpConvert_ObjStr(nanometers,meters,1.588e9,showUnits,NULL);
+        printf("1.588e9 nm = %s\n",nm_conv_str);
+    }
+    else {
+        printf("nanometers is NULL\n");
+    }
+
+    if (meters && angstrom && centimeters) {
+        value = rpConvert_ObjDbl(angstrom,meters,1.0,&result);
+        printf("1 angstrom = %e meters\n",value);
+
+        value = rpConvert_ObjDbl(centimeters,angstrom,1e-8,&result);
+        printf("1.0e-8 centimeter = %f angstroms\n",value);
+    }
+    else {
+        printf("meters or angstrom or centimeters is NULL\n");
+    }
+
+
+    if (fahrenheit && celcius) {
+        value = rpConvert_ObjDbl(fahrenheit,celcius,72,&result);
+        printf("72 degrees fahrenheit = %f degrees celcius\n",value);
+
+        value = rpConvert_ObjDbl(celcius,fahrenheit,value,&result);
+        printf("22.222 degrees celcius = %f degrees fahrenheit\n",value);
+    }
+    else {
+        printf("fahrenheit or celcius is NULL\n");
+    }
+
+    if (celcius && kelvin) {
+        value = rpConvert_ObjDbl(celcius,kelvin,20,&result);
+        printf("20 degrees celcius = %f kelvin\n",value);
+
+        value = rpConvert_ObjDbl(kelvin,celcius,300,&result);
+        printf("300 kelvin = %f degrees celcius\n", value);
+    }
+    else {
+        printf("celcius or kelvin is NULL\n");
+    }
+
+    printf("====== adding all preset units ======\n");
+    rpAddPresets("all");
+
+    printf("====== TESTING STATIC CONVERT FXNS ======\n");
+
+    retStr = rpConvert("72F","C",1,&result);
+    printf("72F = %s\tresult = %d\n", retStr,result);
+
+    retStr = rpConvert("300K","F",1,&result);
+    printf("300K = %s\tresult = %d\n", retStr,result);
+
+    retStr = rpConvert("1eV","J",0,&result);
+    printf("1eV = %s (no units)\tresult = %d\n", retStr,result);
+
+    retStr = rpConvertStr("300K","R",1,&result);
+    printf("300K = %s\tresult = %d\n", retStr,result);
+
+    retStr = rpConvertStr("5m","ft",1,&result);
+    printf("5m = %s\tresult = %d\n", retStr,result);
+
+    value = rpConvertDbl("5000mV","V",&result);
+    printf("5V = %f (double value)\n", value);
+
+
+    return 0;
+}
Index: /branches/blt4/oldtest/src/RpUnitsF_test.f
===================================================================
--- /branches/blt4/oldtest/src/RpUnitsF_test.f	(revision 2040)
+++ /branches/blt4/oldtest/src/RpUnitsF_test.f	(revision 2040)
@@ -0,0 +1,34 @@
+c ----------------------------------------------------------------------
+c  TEST: Fortran's interface to RpUnits.
+c
+c  Basic units conversion tests for the RpUnits portion of Rappture
+c  written in Fortran.
+c ======================================================================
+c  AUTHOR:  Derrick Kearney, Purdue University
+c  Copyright (c) 2004-2005  Purdue Research Foundation
+c
+c  See the file "license.terms" for information on usage and
+c  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+c ======================================================================
+      program units_test
+        IMPLICIT NONE
+
+        integer rp_units_convert_str
+        integer rp_units_convert_dbl
+
+        double precision dblVal
+        character*40 retStr
+        integer retVal
+
+        retVal = rp_units_convert_str("72F","C",retStr)
+        print *,"72F = ",retStr
+        print *,"correct retVal = 22.222C",retVal
+        print *,"retVal = ",retVal
+
+        retVal = rp_units_convert_dbl("72F","C",dblVal)
+        print *,"72F = ",dblVal, " (no units)"
+        print *,"correct retVal = 22.222",retVal
+        print *,"retVal = ",retVal
+
+      end program units_test
+
Index: /branches/blt4/oldtest/src/RpUnits_test.cc
===================================================================
--- /branches/blt4/oldtest/src/RpUnits_test.cc	(revision 2040)
+++ /branches/blt4/oldtest/src/RpUnits_test.cc	(revision 2040)
@@ -0,0 +1,511 @@
+/*
+ * ======================================================================
+ *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include "RpUnits.h"
+#include <list>
+#include <string>
+#include <cassert>
+
+
+void success() 
+{
+    printf ("Test Successful\n");
+}
+
+void fail() 
+{
+    printf ("Test FAILED !!!!!!!!!!!!!!!!!\n");
+    exit(-1);
+}
+
+// compare_numbers()
+
+int main()
+{
+    double value = 0.0;
+    std::string strValue;
+    int result = 0;
+
+    //
+    // use main to test class functionality
+    // 
+
+    // test define(units,basis)
+    // this should create an object of type RpUnits
+    // with the units of "m" and basis should be NULL 
+    // which tells us that this object represents a fundamental system
+    // of units
+    //
+    printf ("=============== TEST 1 ===============\n");
+
+    const RpUnits* meters = RpUnits::find("m");
+    const RpUnits* cmeters = RpUnits::find("cm");
+    const RpUnits* angstrom = RpUnits::find("A");
+
+    value = angstrom->convert(meters,1.0,&result);
+    std::cout << "1 angstrom = " << value << " meters" << std::endl;
+    std::cout << "result = " << result << std::endl;
+
+    result = 0;
+    value = cmeters->convert(angstrom,1e-8,&result);
+    std::cout << "1.0e-8 centimeter = " << value << " angstroms" << std::endl;
+
+
+    const RpUnits* fahrenheit  = RpUnits::find("F");
+    const RpUnits* celcius  = RpUnits::find("C");
+    const RpUnits* kelvin  = RpUnits::find("K");
+
+    value = fahrenheit->convert(celcius,72,&result);
+    std::cout << "72 degrees fahrenheit = " << value << " degrees celcius" << std::endl;
+
+    value = celcius->convert(fahrenheit,value,&result);
+    std::cout << "22.222 degrees celcius = " << value << " degrees fahrenheit" << std::endl;
+
+    value = celcius->convert(kelvin,20,&result);
+    std::cout << "20 degrees celcius = " << value << " kelvin" << std::endl;
+
+    value = kelvin->convert(celcius,300,&result);
+    std::cout << "300 kelvin = " << value << " degrees celcius" << std::endl;
+
+/*
+    // test getUnits() member function of objects of type RpUnits
+    // this test should return the units of "m" for the oject
+    // meters
+    //
+    printf ("=============== TEST 2 ===============\n");
+    (meters->getUnits().c_str()) ? success() : fail();
+    printf("meters units = :%s:\n", meters->getUnits().c_str());
+    
+    // test getBasis() functionality of objects of type RpUnits
+    // create an object of type RpUnits and associate it with the 
+    // meters RpUnits object as its basis.
+    // print out what it reports its basis is.
+    //
+    printf ("=============== TEST 3 ===============\n");
+    std::string t3units = "cm";
+    // RpUnits * centimeters = RpUnits::define("cm", meters);
+    RpUnits * centimeters = RpUnits::define(t3units, meters);
+    (centimeters) ? success() : fail();
+    printf("cm units = :%s:\n", centimeters->getUnits().c_str() );
+    printf("cm basis = :%s:\n", centimeters->getBasis()->getUnits().c_str() );
+
+    // test makeBasis()
+    //
+    printf ("=============== TEST 4.1 ===============\n");
+    // value = centimeters->makeBasis(100.00);
+    value = 100.00;
+    failTest = centimeters->makeBasis(&value);
+    (value == 1 && !failTest) ? success() : fail();
+    printf("100 cm = :%f: meters\n", value);
+
+    // test makeBasis() with a list of values, all the same units
+    // 
+    printf ("=============== TEST 4.2 ===============\n");
+//    
+//    double * valueArr = (double *) calloc(12,sizeof(double));
+//    if (!valueArr) {
+//        // complain that malloc failed
+//        exit(-2);
+//    }
+//
+//    valueArr = centimeters->makeBasis(100.00);
+//
+    // (value == 1) ? success() : fail();
+    // printf("100 cm = :%f: meters\n", value);
+
+    // test makeBasis() with a list of values, all different units
+    // 
+    printf ("=============== TEST 4.3 ===============\n");
+    // value = centimeters->makeBasis(100.00);
+    // (value == 1) ? success() : fail();
+    // printf("100 cm = :%f: meters\n", value);
+
+*/
+
+    printf ("=============== TEST 4.4 ===============\n");
+
+    const RpUnits * millimeter = RpUnits::find("mm");
+    const RpUnits * micrometer = RpUnits::find("um");
+    const RpUnits * nanometer  = RpUnits::find("nm");
+    const RpUnits * picometer  = RpUnits::find("pm");
+    const RpUnits * femtometer = RpUnits::find("fm");
+    const RpUnits * attometer  = RpUnits::find("am");
+    const RpUnits * kilometer  = RpUnits::find("km");
+    const RpUnits * megameter  = RpUnits::find("Mm");
+    const RpUnits * gigameter  = RpUnits::find("Gm");
+    const RpUnits * terameter  = RpUnits::find("Tm");
+    const RpUnits * petameter  = RpUnits::find("Pm");
+
+    value = 1.0e+3;
+    millimeter->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e3 mm = :%f: meters\n", value);
+
+    value = 1.0e+6; 
+    micrometer->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e6 um = :%f: meters\n", value);
+
+    value = 1.0e+9;
+    nanometer->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e9 nm = :%f: meters\n", value);
+
+    value = 1.0e+12;
+    picometer->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e12 pm = :%f: meters\n", value);
+
+    value = 1.0e+15;
+    femtometer->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e15 fm = :%f: meters\n", value);
+
+    value = 1.0e+18;
+    attometer->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e18 am = :%f: meters\n", value);
+
+    value = 1.0e-3;
+    kilometer->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e-3 km = :%f: meters\n", value);
+
+    value = 1.0e-6;
+    megameter->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e-6 Mm = :%f: meters\n", value);
+
+    value = 1.0e-9;
+    gigameter->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e-9 Gm = :%f: meters\n", value);
+
+    value = 1.0e-12;
+    terameter->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e-12 Gm = :%f: meters\n", value);
+
+    value = 1.0e-15;
+    petameter->makeBasis(&value);
+    (value == 1) ? success() : fail();
+    printf("1.0e-15 Pm = :%f: meters\n", value);
+
+    value = 2;
+    meters->makeBasis(&value);
+    (value == 2) ? success() : fail();
+    printf("2 m = :%f: meters\n", value);
+
+    printf ("=============== TEST 5 ===============\n");
+
+    strValue = RpUnits::convert("72F","C",1);
+    std::cout << "result = " << result << std::endl;
+    std::cout << "strValue convert(72F,C,1) = " << strValue << std::endl;
+
+    strValue = RpUnits::convert("72F","C",0);
+    std::cout << "result = " << result << std::endl;
+    std::cout << "strValue convert(72F,C,0) = " << strValue << std::endl;
+
+    strValue = RpUnits::convert("20C","K",1);
+    std::cout << "result = " << result << std::endl;
+    std::cout << "strValue convert(20C,K,1) = " << strValue << std::endl;
+
+    strValue = RpUnits::convert("20C","K",0);
+    std::cout << "result = " << result << std::endl;
+    std::cout << "strValue convert(20C,K,1) = " << strValue << std::endl;
+
+    strValue = RpUnits::convert("300K","C",1);
+    std::cout << "result = " << result << std::endl;
+    std::cout << "strValue convert(300K,C,1) = " << strValue << std::endl;
+
+    strValue = RpUnits::convert("300K","C",0);
+    std::cout << "result = " << result << std::endl;
+    std::cout << "strValue convert(300K,C,0) = " << strValue << std::endl;
+
+
+
+
+    const RpUnits* eV  = RpUnits::find("eV");
+    const RpUnits* joules  = RpUnits::find("J");
+
+    value = joules->convert(eV,1,&result);
+    std::cout << "1 joule = " << value << " electronVolts" << std::endl;
+
+    value = eV->convert(joules,1,&result);
+    std::cout << "1 electronVolt = " << value << " joules" << std::endl;
+
+    strValue = RpUnits::convert("10eV","J",1);
+    std::cout << "strValue convert(10eV,J,1) = " << strValue << std::endl;
+
+    strValue = RpUnits::convert("1eV","J",0);
+    std::cout << "strValue convert(1eV,J,0) = " << strValue << std::endl;
+
+    strValue = RpUnits::convert("10J","eV",1);
+    std::cout << "strValue convert(10J,eV,1) = " << strValue << std::endl;
+
+    strValue = RpUnits::convert("1J","eV",0);
+    std::cout << "strValue convert(1J,eV,0) = " << strValue << std::endl;
+
+
+
+
+
+
+    std::cout << "TESTING COPY CONSTRUCTOR" << std::endl;
+
+    RpUnits *origRpUnits = RpUnits::define("obj2", NULL, "");
+    RpUnits copyRpUnits = *origRpUnits;
+
+    std::cout << "origRpUnits = " << origRpUnits->getUnitsName() << std::endl;
+    std::cout << "copyRpUnits = " << copyRpUnits.getUnitsName() << std::endl;
+    std::cout << "modifying origRpUnits" << std::endl;
+    delete origRpUnits;
+    origRpUnits = RpUnits::define("obj3",NULL, "");
+    std::cout << "origRpUnits = " << origRpUnits->getUnitsName() << std::endl;
+    std::cout << "copyRpUnits = " << copyRpUnits.getUnitsName() << std::endl;
+    std::cout << "deleting origRpUnits" << std::endl;
+    delete origRpUnits;
+    std::cout << "copyRpUnits = " << copyRpUnits.getUnitsName() << std::endl;
+
+    std::cout << "TESTING COPY ASSIGNMENT OPERATOR" << std::endl;
+
+    RpUnits *testRpUnits = RpUnits::define("test2", NULL, "");
+    copyRpUnits = *testRpUnits;
+
+    std::cout << "testRpUnits = " << testRpUnits->getUnitsName() << std::endl;
+    std::cout << "copyRpUnits = " << copyRpUnits.getUnitsName() << std::endl;
+    std::cout << "modifying testRpUnits" << std::endl;
+    delete testRpUnits;
+    testRpUnits = RpUnits::define("test3",NULL, "");
+    std::cout << "testRpUnits = " << testRpUnits->getUnitsName() << std::endl;
+    std::cout << "copyRpUnits = " << copyRpUnits.getUnitsName() << std::endl;
+    std::cout << "deleting testRpUnits" << std::endl;
+    delete testRpUnits;
+    std::cout << "copyRpUnits = " << copyRpUnits.getUnitsName() << std::endl;
+
+
+    // test deleting a const object
+
+    const RpUnits* myobj = RpUnits::define("myunit",NULL, "");
+    delete myobj;
+
+    // test /cm2
+    // std::cout << "convert (3m3 -> cm3)     = " << RpUnits::convert("3m3","cm3",0) << std::endl;
+    // std::cout << "convert (3/m3 -> /cm3)   = " << RpUnits::convert("3/m3","/cm3",0) << std::endl;
+    // std::cout << "convert (300cm3 -> m3)   = " << RpUnits::convert("300cm3","m3",0) << std::endl;
+    // std::cout << "convert (300/cm3 -> /m3) = " << RpUnits::convert("300/cm3","/m3",0) << std::endl;
+
+    std::cout << "convert (3m3 -> cm3)     = " << RpUnits::convert("3m3","cm3",0) << std::endl;
+    std::cout << "convert (3/m3 -> /cm3)   = " << RpUnits::convert("3/m3","/cm3",0) << std::endl;
+    std::cout << "convert (300cm3 -> m3)   = " << RpUnits::convert("300cm3","m3",0) << std::endl;
+    std::cout << "convert (300/cm3 -> /m3) = " << RpUnits::convert("300/cm3","/m3",0) << std::endl;
+    std::cout << "convert (72F -> 22.22C) = " << RpUnits::convert("72F","C",0) << std::endl;
+    std::cout << "convert (5J -> 3.12075e+28neV) = " << RpUnits::convert("5J","neV",0) << std::endl;
+    std::cout << "convert (5J2 -> 1.9478e+56neV2) = " << RpUnits::convert("5J2","neV2",0) << std::endl;
+
+    // testing complex units
+    std::cout << "convert (1cm2/Vs -> 0.0001m2/Vs) = " << RpUnits::convert("1cm2/Vs","m2/Vs",0) << std::endl;
+    std::cout << "convert (1cm2/Vs -> 0.1m2/kVs) = " << RpUnits::convert("1cm2/Vs","m2/kVs",0) << std::endl;
+    std::cout << "convert (1cm2/Vs -> 1e-7m2/kVus) = " << RpUnits::convert("1cm2/Vs","m2/kVus",0) << std::endl;
+
+    const RpUnits* myMeters = RpUnits::find("cm");
+    std::list<std::string> convList = myMeters->getCompatible();
+    std::list<std::string>::iterator convListIter;
+
+    std::cout << myMeters->getUnitsName() << " is of type: " << myMeters->getType() << std::endl;
+    std::cout << myMeters->getUnitsName() << " is compatible with: " << std::endl;
+    convListIter = convList.begin();
+    while (convListIter != convList.end()) {
+        std::cout << *convListIter << std::endl;
+        convListIter++;
+    }
+
+    std::cout << "convert(\"5.00mm\",\"\",1) = " << RpUnits::convert("5.00mm","",1) << std::endl;
+    std::cout << "convert(\"5.00mm\",\"\",0) = " << RpUnits::convert("5.00mm","",0) << std::endl;
+
+    // day hour min sec test
+    assert((RpUnits::convert("5.00s","s",RpUnits::UNITS_ON)) == "5s");
+    std::cout << "convert(\"5.00s\",\"s\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00s","s",RpUnits::UNITS_OFF)) == "5");
+    std::cout << "convert(\"5.00s\",\"s\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00min","s",RpUnits::UNITS_ON)) == "300s");
+    std::cout << "convert(\"5.00min\",\"s\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00min","s",RpUnits::UNITS_OFF)) == "300");
+    std::cout << "convert(\"5.00min\",\"s\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00h","s",RpUnits::UNITS_ON)) == "18000s");
+    std::cout << "convert(\"5.00h\",\"s\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00h","s",RpUnits::UNITS_OFF)) == "18000");
+    std::cout << "convert(\"5.00h\",\"s\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00d","s",RpUnits::UNITS_ON)) == "432000s");
+    std::cout << "convert(\"5.00d\",\"s\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00d","s",RpUnits::UNITS_OFF)) == "432000");
+    std::cout << "convert(\"5.00d\",\"s\",UNITS_OFF) passed" << std::endl;
+
+    assert((RpUnits::convert("5.00s","min",RpUnits::UNITS_ON)) == "0.0833333min");
+    std::cout << "convert(\"5.00s\",\"min\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00s","min",RpUnits::UNITS_OFF)) == "0.0833333");
+    std::cout << "convert(\"5.00s\",\"min\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00min","min",RpUnits::UNITS_ON)) == "5min");
+    std::cout << "convert(\"5.00min\",\"min\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00min","min",RpUnits::UNITS_OFF)) == "5");
+    std::cout << "convert(\"5.00min\",\"min\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00h","min",RpUnits::UNITS_ON)) == "300min");
+    std::cout << "convert(\"5.00h\",\"min\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00h","min",RpUnits::UNITS_OFF)) == "300");
+    std::cout << "convert(\"5.00h\",\"min\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00d","min",RpUnits::UNITS_ON)) == "7200min");
+    std::cout << "convert(\"5.00d\",\"min\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00d","min",RpUnits::UNITS_OFF)) == "7200");
+    std::cout << "convert(\"5.00d\",\"min\",UNITS_OFF) passed" << std::endl;
+
+    assert((RpUnits::convert("5.00s","h",RpUnits::UNITS_ON)) == "0.00138889h");
+    std::cout << "convert(\"5.00s\",\"h\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00s","h",RpUnits::UNITS_OFF)) == "0.00138889");
+    std::cout << "convert(\"5.00s\",\"h\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00min","h",RpUnits::UNITS_ON)) == "0.0833333h");
+    std::cout << "convert(\"5.00min\",\"h\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00min","h",RpUnits::UNITS_OFF)) == "0.0833333");
+    std::cout << "convert(\"5.00min\",\"h\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00h","h",RpUnits::UNITS_ON)) == "5h");
+    std::cout << "convert(\"5.00h\",\"h\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00h","h",RpUnits::UNITS_OFF)) == "5");
+    std::cout << "convert(\"5.00h\",\"h\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00d","h",RpUnits::UNITS_ON)) == "120h");
+    std::cout << "convert(\"5.00d\",\"h\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00d","h",RpUnits::UNITS_OFF)) == "120");
+    std::cout << "convert(\"5.00d\",\"h\",UNITS_OFF) passed" << std::endl;
+
+    assert((RpUnits::convert("5.00s","d",RpUnits::UNITS_ON)) == "5.78704e-05d");
+    std::cout << "convert(\"5.00s\",\"d\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00s","d",RpUnits::UNITS_OFF)) == "5.78704e-05");
+    std::cout << "convert(\"5.00s\",\"d\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00min","d",RpUnits::UNITS_ON)) == "0.00347222d");
+    std::cout << "convert(\"5.00min\",\"d\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00min","d",RpUnits::UNITS_OFF)) == "0.00347222");
+    std::cout << "convert(\"5.00min\",\"d\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00h","d",RpUnits::UNITS_ON)) == "0.208333d");
+    std::cout << "convert(\"5.00h\",\"d\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00h","d",RpUnits::UNITS_OFF)) == "0.208333");
+    std::cout << "convert(\"5.00h\",\"d\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00d","d",RpUnits::UNITS_ON)) == "5d");
+    std::cout << "convert(\"5.00d\",\"d\",UNITS_ON)  passed" << std::endl;
+    assert((RpUnits::convert("5.00d","d",RpUnits::UNITS_OFF)) == "5");
+    std::cout << "convert(\"5.00d\",\"d\",UNITS_OFF) passed" << std::endl;
+
+
+
+    assert((RpUnits::convert("5.00bar","Pa",RpUnits::UNITS_OFF)) == "500000");
+    std::cout << "convert(\"5.00bar\",\"Pa\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00bar","Pa",RpUnits::UNITS_ON)) == "500000Pa");
+    std::cout << "convert(\"5.00bar\",\"Pa\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00bar","atm",RpUnits::UNITS_OFF)) == "4.9346");
+    std::cout << "convert(\"5.00bar\",\"atm\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00bar","atm",RpUnits::UNITS_ON)) == "4.9346atm");
+    std::cout << "convert(\"5.00bar\",\"atm\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00bar","torr",RpUnits::UNITS_OFF)) == "3750.3");
+    std::cout << "convert(\"5.00bar\",\"torr\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00bar","torr",RpUnits::UNITS_ON)) == "3750.3torr");
+    std::cout << "convert(\"5.00bar\",\"torr\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00bar","psi",RpUnits::UNITS_OFF)) == "72.52");
+    std::cout << "convert(\"5.00bar\",\"psi\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00bar","psi",RpUnits::UNITS_ON)) == "72.52psi");
+    std::cout << "convert(\"5.00bar\",\"psi\",UNITS_ON) passed" << std::endl;
+
+
+
+
+    assert((RpUnits::convert("5.00atm","bar",RpUnits::UNITS_OFF)) == "5.06627");
+    std::cout << "convert(\"5.00atm\",\"bar\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00atm","bar",RpUnits::UNITS_ON)) == "5.06627bar");
+    std::cout << "convert(\"5.00atm\",\"bar\",UNITS_ON) passed" << std::endl;
+    /*
+    assert((RpUnits::convert("5.00atm","Pa",RpUnits::UNITS_OFF)) == "506625.12");
+    std::cout << "convert(\"5.00atm\",\"Pa\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00atm","Pa",RpUnits::UNITS_ON)) == "506625.12Pa");
+    std::cout << "convert(\"5.00atm\",\"Pa\",UNITS_ON) passed" << std::endl;
+    */
+    assert((RpUnits::convert("5.00atm","torr",RpUnits::UNITS_OFF)) == "3800");
+    std::cout << "convert(\"5.00atm\",\"torr\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00atm","torr",RpUnits::UNITS_ON)) == "3800torr");
+    std::cout << "convert(\"5.00atm\",\"torr\",UNITS_ON) passed" << std::endl;
+
+
+
+
+    assert((RpUnits::convert("5.00Pa","bar",RpUnits::UNITS_OFF)) == "5e-05");
+    std::cout << "convert(\"5.00Pa\",\"bar\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00Pa","bar",RpUnits::UNITS_ON)) == "5e-05bar");
+    std::cout << "convert(\"5.00Pa\",\"bar\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00Pa","atm",RpUnits::UNITS_OFF)) == "4.9346e-05");
+    std::cout << "convert(\"5.00Pa\",\"atm\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00Pa","atm",RpUnits::UNITS_ON)) == "4.9346e-05atm");
+    std::cout << "convert(\"5.00Pa\",\"atm\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00Pa","torr",RpUnits::UNITS_OFF)) == "0.037503");
+    std::cout << "convert(\"5.00Pa\",\"torr\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00Pa","torr",RpUnits::UNITS_ON)) == "0.037503torr");
+    std::cout << "convert(\"5.00Pa\",\"torr\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00Pa","psi",RpUnits::UNITS_OFF)) == "0.0007252");
+    std::cout << "convert(\"5.00Pa\",\"psi\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00Pa","psi",RpUnits::UNITS_ON)) == "0.0007252psi");
+    std::cout << "convert(\"5.00Pa\",\"psi\",UNITS_ON) passed" << std::endl;
+
+
+
+
+    assert((RpUnits::convert("5.00torr","bar",RpUnits::UNITS_OFF)) == "0.00666613");
+    std::cout << "convert(\"5.00torr\",\"bar\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00torr","bar",RpUnits::UNITS_ON)) == "0.00666613bar");
+    std::cout << "convert(\"5.00torr\",\"bar\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00torr","Pa",RpUnits::UNITS_OFF)) == "666.613");
+    std::cout << "convert(\"5.00torr\",\"Pa\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00torr","Pa",RpUnits::UNITS_ON)) == "666.613Pa");
+    std::cout << "convert(\"5.00torr\",\"Pa\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00torr","atm",RpUnits::UNITS_OFF)) == "0.006579");
+    std::cout << "convert(\"5.00torr\",\"atm\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00torr","atm",RpUnits::UNITS_ON)) == "0.006579atm");
+    std::cout << "convert(\"5.00torr\",\"atm\",UNITS_ON) passed" << std::endl;
+    assert((RpUnits::convert("5.00torr","psi",RpUnits::UNITS_OFF)) == "0.096685");
+    std::cout << "convert(\"5.00torr\",\"psi\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00torr","psi",RpUnits::UNITS_ON)) == "0.096685psi");
+    std::cout << "convert(\"5.00torr\",\"psi\",UNITS_ON) passed" << std::endl;
+
+
+    assert((RpUnits::convert("5.00psi","bar",RpUnits::UNITS_OFF)) == "0.344738");
+    std::cout << "convert(\"5.00psi\",\"bar\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00psi","bar",RpUnits::UNITS_ON)) == "0.344738bar");
+    std::cout << "convert(\"5.00psi\",\"bar\",UNITS_ON) passed" << std::endl;
+    /*
+    assert((RpUnits::convert("5.00psi","Pa",RpUnits::UNITS_OFF)) == "34473.8129155");
+    std::cout << "convert(\"5.00psi\",\"Pa\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00psi","Pa",RpUnits::UNITS_ON)) == "34473.8129155Pa");
+    std::cout << "convert(\"5.00psi\",\"Pa\",UNITS_ON) passed" << std::endl;
+    */
+    assert((RpUnits::convert("5.00psi","torr",RpUnits::UNITS_OFF)) == "258.575");
+    std::cout << "convert(\"5.00psi\",\"torr\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00psi","torr",RpUnits::UNITS_ON)) == "258.575torr");
+    std::cout << "convert(\"5.00psi\",\"torr\",UNITS_ON) passed" << std::endl;
+
+
+
+
+    assert((RpUnits::convert("5.00psi","kPa",RpUnits::UNITS_OFF)) == "34.4738");
+    std::cout << "convert(\"5.00psi\",\"kPa\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00psi","kPa",RpUnits::UNITS_ON)) == "34.4738kPa");
+    std::cout << "convert(\"5.00psi\",\"kPa\",UNITS_ON) passed" << std::endl;
+
+
+
+
+    assert((RpUnits::convert("5.00torr","mmHg",RpUnits::UNITS_OFF)) == "5");
+    std::cout << "convert(\"5.00torr\",\"mmHg\",UNITS_OFF) passed" << std::endl;
+    assert((RpUnits::convert("5.00torr","mmHg",RpUnits::UNITS_ON)) == "5mmHg");
+    std::cout << "convert(\"5.00torr\",\"mmHg\",UNITS_ON) passed" << std::endl;
+
+    return 0;
+
+}
Index: /branches/blt4/oldtest/src/RpVariable_test.cc
===================================================================
--- /branches/blt4/oldtest/src/RpVariable_test.cc	(revision 2040)
+++ /branches/blt4/oldtest/src/RpVariable_test.cc	(revision 2040)
@@ -0,0 +1,91 @@
+/*
+ * ======================================================================
+ *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include "RpVariable.h"
+
+int test_getPath(RpVariable* myVariable);
+int test_getDefaultValue(RpVariable* myVariable);
+int test_getCurrentValue(RpVariable* myVariable);
+int test_getLabel(RpVariable* myVariable);
+int test_getDesc(RpVariable* myVariable);
+
+int test_getPath(RpVariable* myVariable)
+{
+    std::cout << "Path " << myVariable->getPath() << std::endl;
+
+    return 1;
+}
+
+int test_getDefaultValue(RpVariable* myVariable)
+{
+    std::cout << "defaultVal " << *((double*) myVariable->getDefaultValue()) << std::endl;
+
+    return 1;
+}
+
+int test_getCurrentValue(RpVariable* myVariable)
+{
+    std::cout << "currentVal " << myVariable->getCurrentValue() << std::endl;
+
+    return 1;
+}
+
+int test_getLabel(RpVariable* myVariable)
+{
+    std::cout << "label " << myVariable->getLabel() << std::endl;
+
+    return 1;
+}
+
+int test_getDesc(RpVariable* myVariable)
+{
+    std::cout << "desc " << myVariable->getDesc() << std::endl;
+
+    return 1;
+}
+
+
+
+int main ()
+{
+
+    RpVariable* T1 = new RpVariable("input.(ambient).(temperature)",new double(300.00));
+    /*
+    RpVariable* T2 = new RpVariable("input.(ambient).(temperature)",
+                                "K",
+                                300.00,
+                                0.00,
+                                1000.00,
+                                "Temperature",
+                                "Ambient Temperature, value between 0 and 1000"
+                                );
+    */
+    
+    test_getPath(T1);
+    test_getDefaultValue(T1);
+//    test_getCurrentValue(T1);
+    test_getLabel(T1);
+    test_getDesc(T1);
+
+    std::cout << std::endl;
+
+    /*
+    test_getPath(T2);
+    test_getUnits(T2);
+    test_getDefaultValue(T2);
+    test_getCurrentValue(T2);
+    test_getMin(T2);
+    test_getMax(T2);
+    test_getLabel(T2);
+    test_getDesc(T2);
+    */
+
+    std::cout << std::endl;
+
+    return 0;
+}
Index: /branches/blt4/oldtest/src/matlab/test_children.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_children.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_children.m	(revision 2040)
@@ -0,0 +1,35 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_children(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_children(lib,path)
+    err = 1;
+    prevNodeHandle = 0;
+    nodeHandle = -1;
+
+    disp(sprintf('\n\nTESTING rpLibChildren\n'));
+
+    while nodeHandle ~= 0
+        [nodeHandle,err] = rpLibChildren(lib,path,prevNodeHandle);
+        prevNodeHandle = nodeHandle;
+
+        if ~err
+            if nodeHandle
+                [compStr,err] = rpLibNodeComp(nodeHandle);
+                disp(sprintf('%s compStr = %s\n', path, compStr));
+            end
+        else
+            disp(sprintf('Error within rpLibChildren function\n'));
+        end
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_children_bytype.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_children_bytype.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_children_bytype.m	(revision 2040)
@@ -0,0 +1,35 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_children_bytype(lib, path, type)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_children_bytype(lib,path,type)
+    err = 1;
+    prevNodeHandle = 0;
+    nodeHandle = -1;
+
+    disp(sprintf('\n\nTESTING rpLibChildrenByType\n'));
+
+    while nodeHandle ~= 0
+        [nodeHandle,err] = rpLibChildrenByType(lib,path,prevNodeHandle,type);
+        prevNodeHandle = nodeHandle;
+
+        if ~err
+            if nodeHandle
+                [compStr,err] = rpLibNodeComp(nodeHandle);
+                disp(sprintf ('%s compStr = %s\n', path, compStr));
+            end
+        else
+            disp(sprintf('Error within rpLibChildrenByType function\n'));
+        end
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_convert.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_convert.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_convert.m	(revision 2040)
@@ -0,0 +1,25 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_convert(fromVal, toUnitsName, showUnits)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_convert(fromVal, toUnitsName, showUnits)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsConvert: convert %s to %s, showUnits: %i\n', fromVal, toUnitsName, showUnits));
+
+    [retStr,err] = rpUnitsConvert(fromVal, toUnitsName, showUnits);
+    if ~err
+        disp(sprintf('%s = %s\n',fromVal,retStr));
+    else
+        disp(sprintf('Error within rpUnitsConvert function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_convert_dbl.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_convert_dbl.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_convert_dbl.m	(revision 2040)
@@ -0,0 +1,25 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_convert_dbl(fromVal, toUnitsName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_convert_dbl(fromVal, toUnitsName)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsConvertDbl: convert %s to %s\n', fromVal, toUnitsName));
+
+    [retVal,err] = rpUnitsConvertDbl(fromVal, toUnitsName);
+    if ~err
+        disp(sprintf('%s = %e\n',fromVal,retVal));
+    else
+        disp(sprintf('Error within rpUnitsConvertDbl function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_convert_obj_dbl.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_convert_obj_dbl.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_convert_obj_dbl.m	(revision 2040)
@@ -0,0 +1,25 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_convert_obj_dbl(fromVal, toUnitsName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_convert_dbl(fromVal, toUnitsName)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsConvertDbl: convert %s to %s\n', fromVal, toUnitsName));
+
+    [retVal,err] = rpUnitsConvertDbl(fromVal, toUnitsName);
+    if ~err
+        disp(sprintf('%s = %e\n',fromVal,retVal));
+    else
+        disp(sprintf('Error within rpUnitsConvertDbl function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_convert_obj_str.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_convert_obj_str.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_convert_obj_str.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpElement\n'));
+    [nodeHandle,err] = rpElement(lib,path);
+    if nodeHandle && ~err
+        [compStr,err] = rpNodeComp(nodeHandle);
+        disp(sprintf ('%s compStr = %s\n', path, compStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpNodeId(nodeHandle);
+        disp(sprintf ('%s idStr   = %s\n', path, idStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpNodeType(nodeHandle);
+        disp(sprintf ('%s typeStr = %s\n', path, typeStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        disp(sprintf('Error within rpElement function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_convert_str.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_convert_str.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_convert_str.m	(revision 2040)
@@ -0,0 +1,25 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_convert(fromVal, toUnitsName, showUnits)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_convert_str(fromVal, toUnitsName, showUnits)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsConvertStr: convert %s to %s, showUnits: %i\n', fromVal, toUnitsName, showUnits));
+
+    [retStr,err] = rpUnitsConvertStr(fromVal, toUnitsName, showUnits);
+    if ~err
+        disp(sprintf('%s = %s\n',fromVal,retStr));
+    else
+        disp(sprintf('Error within rpUnitsConvert function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_define_unit.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_define_unit.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_define_unit.m	(revision 2040)
@@ -0,0 +1,30 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_define_unit(unitSymbol, basisHandle)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_define_unit(unitSymbol, basisHandle)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsDefineUnit\n'));
+    [unitsHandle,err] = rpUnitsDefineUnit(unitSymbol, basisHandle);
+    if ~err
+
+        if unitsHandle
+            disp(sprintf ('Successfully Created %s\n',unitSymbol));
+        else
+            disp(sprintf ('FAILED Creating %s\n',unitSymbol));
+        end
+
+    else
+        disp(sprintf('Error within rpUnitsDefineUnits function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_element.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_element.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_element.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibElement\n'));
+    [nodeHandle,err] = rpLibElement(lib,path);
+    if (nodeHandle && ~err)
+        [compStr,err] = rpLibNodeComp(nodeHandle);
+        disp(sprintf ('%s compStr = %s\n', path, compStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpLibNodeId(nodeHandle);
+        disp(sprintf ('%s idStr   = %s\n', path, idStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpLibNodeType(nodeHandle);
+        disp(sprintf ('%s typeStr = %s\n', path, typeStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        disp(sprintf('Error within rpLibElement function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_element_comp.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_element_comp.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_element_comp.m	(revision 2040)
@@ -0,0 +1,24 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_element_comp(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element_comp(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibElementAsComp\n'));
+    [compStr,err] = rpLibElementAsComp(lib,path);
+    if (~strcmp(compStr,'') && ~err)
+        disp(sprintf ('%s compStr = %s\n', path, compStr));
+    else
+        disp(sprintf('Error within rpLibElementAsComp function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_element_id.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_element_id.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_element_id.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpElement\n'));
+    [nodeHandle,err] = rpElement(lib,path);
+    if nodeHandle && ~err
+        [compStr,err] = rpNodeComp(nodeHandle);
+        disp(sprintf ('%s compStr = %s\n', path, compStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpNodeId(nodeHandle);
+        disp(sprintf ('%s idStr   = %s\n', path, idStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpNodeType(nodeHandle);
+        disp(sprintf ('%s typeStr = %s\n', path, typeStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        disp(sprintf('Error within rpElement function\n');
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_element_object.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_element_object.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_element_object.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpElement\n'));
+    [nodeHandle,err] = rpElement(lib,path);
+    if nodeHandle && ~err
+        [compStr,err] = rpNodeComp(nodeHandle);
+        disp(sprintf ('%s compStr = %s\n', path, compStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpNodeId(nodeHandle);
+        disp(sprintf ('%s idStr   = %s\n', path, idStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpNodeType(nodeHandle);
+        disp(sprintf ('%s typeStr = %s\n', path, typeStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        disp(sprintf('Error within rpElement function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_element_type.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_element_type.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_element_type.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpElement\n'));
+    [nodeHandle,err] = rpElement(lib,path);
+    if nodeHandle && ~err
+        [compStr,err] = rpNodeComp(nodeHandle);
+        disp(sprintf ('%s compStr = %s\n', path, compStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpNodeId(nodeHandle);
+        disp(sprintf ('%s idStr   = %s\n', path, idStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpNodeType(nodeHandle);
+        disp(sprintf ('%s typeStr = %s\n', path, typeStr));
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        disp(sprintf('Error within rpElement function\n');
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_find.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_find.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_find.m	(revision 2040)
@@ -0,0 +1,28 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_find(unitSymbol)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_find(unitSymbol)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsFind\n'));
+    [nodeHandle,err] = rpUnitsFind(unitSymbol);
+    if ~err
+        if nodeHandle
+            disp(sprintf ('rpUnitsFind Successful\n'));
+        else
+            disp(sprintf ('rpUnitsFind FAILED\n'));
+        end
+    else
+        disp(sprintf('Error within rpElement function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_get.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_get.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_get.m	(revision 2040)
@@ -0,0 +1,28 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_get(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpGet\n'));
+    [retStr,err] = rpLibGet(lib,path);
+    if ~err
+        if ~strcmp(retStr,'')
+            disp(sprintf ('rpGet Successful: %s\n',retStr));
+        else
+            disp(sprintf ('rpGet FAILED\n'));
+        end
+    else
+        disp(sprintf('Error within rpGet function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_get_basis.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_get_basis.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_get_basis.m	(revision 2040)
@@ -0,0 +1,36 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_get_basis(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_basis(unitName)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsGetBasis\n'));
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if ~err && unitHandle
+        [basisHandle,err] = rpUnitsGetBasis(unitHandle);
+        if ~err
+            if basisHandle > 0
+                [retStr,err] = rpUnitsGetUnitsName(basisHandle);
+                disp(sprintf ('basisHandle name = %s\n', retStr));
+            elseif basisHandle < 0
+                disp(sprintf ('%s is a basis unit\n', unitName));
+            else
+                disp(sprintf ('rpUnitsGetBasis FAILED\n'));
+            end
+        else
+            disp(sprintf('Error within rpUnitsGetBasis function\n'));
+        end
+    else
+        disp(sprintf ('rpUnitsGetBasis FAILED\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_get_double.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_get_double.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_get_double.m	(revision 2040)
@@ -0,0 +1,24 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_get_double(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_double(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibGetDouble\n'));
+    [retVal,err] = rpLibGetDouble(lib,path);
+    if ~err
+        disp(sprintf ('rpLibGetDouble Successful: %e\n',retVal));
+    else
+        disp(sprintf('Error within rpLibGetDouble function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_get_exponent.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_get_exponent.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_get_exponent.m	(revision 2040)
@@ -0,0 +1,29 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_get_exponent(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_exponent(unitName)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsGetExponent\n'));
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if ~err && unitHandle
+        [retVal,err] = rpUnitsGetExponent(unitHandle);
+        if ~err
+            disp(sprintf ('Exponent of %s = %e\n', unitName,retVal));
+        else
+            disp(sprintf('Error within rpUnitsGetExponent function\n'));
+        end
+    else
+        disp(sprintf ('rpUnitsGetExponent FAILED\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_get_string.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_get_string.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_get_string.m	(revision 2040)
@@ -0,0 +1,28 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_get_string(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_string(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibGetString\n'));
+    [retStr,err] = rpLibGetString(lib,path);
+    if ~err
+        if ~strcmp(retStr,'')
+            disp(sprintf ('rpLibGetString Successful: %s\n',retStr));
+        else
+            disp(sprintf ('rpLibGetString FAILED\n'));
+        end
+    else
+        disp(sprintf('Error within rpLibGetString function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_get_units.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_get_units.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_get_units.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_get_units(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_units(unitName)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsGetUnits\n'));
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if ~err && unitHandle
+        [retStr,err] = rpUnitsGetUnits(unitHandle);
+        if ~err
+            if ~strcmp(retStr,'')
+                disp(sprintf ('units of %s = %s\n', unitName,retStr));
+            else
+                disp(sprintf ('rpUnitsGetUnits FAILED\n'));
+            end
+        else
+            disp(sprintf('Error within rpUnitsGetUnits function\n'));
+        end
+    else
+        disp(sprintf ('rpUnitsFind FAILED while testing rpUnitsGetUnits\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_get_units_name.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_get_units_name.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_get_units_name.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_get_units_name(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_units_name(unitName)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsGetUnitsName\n'));
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if ~err && unitHandle
+        [retStr,err] = rpUnitsGetUnitsName(unitHandle);
+        if ~err
+            if ~strcmp(retStr,'')
+                disp(sprintf ('units name of %s = %s\n', unitName,retStr));
+            else
+                disp(sprintf ('rpUnitsGetUnitsName FAILED\n'));
+            end
+        else
+            disp(sprintf('Error within rpUnitsGetUnitsName function\n'));
+        end
+    else
+        disp(sprintf ('rpUnitsFind FAILED while testing rpUnitsGetUnitsName\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_make_metric.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_make_metric.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_make_metric.m	(revision 2040)
@@ -0,0 +1,39 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_make_metric(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_make_metric(unitName)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpUnitsMakeMetric\n'));
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if ~err && unitHandle
+        [err] = rpUnitsMakeMetric(unitHandle);
+        if ~err
+            [unitHandle,err] = rpUnitsFind(['c',unitName]);
+            if ~err
+                [retStr,err] = rpUnitsGetUnitsName(unitHandle);
+                if ~err
+                    disp(sprintf ('centi-%s = %s\n', unitName,retStr));
+                else
+                    disp(sprintf('Error in rpUnitsGetUnitsName testing rpUnitsMakeMetric\n'));
+                end
+            else
+                disp(sprintf('Error in rpUnitsFind testing rpUnitsMakeMetric\n'));
+            end
+        else
+            disp(sprintf('Error within rpUnitsMakeMetric function\n'));
+        end
+    else
+        disp(sprintf ('rpUnitsFind FAILED while testing rpUnitsGetUnits\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_node_comp.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_node_comp.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_node_comp.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_node_comp(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_node_comp(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibNodeComp\n'));
+    [nodeHandle,err] = rpLibElement(lib,path);
+    if ~err
+        if nodeHandle
+            [compStr,err] = rpLibNodeComp(nodeHandle);
+            if ~err
+                disp(sprintf ('%s compStr = %s\n', path, compStr));
+            else
+                disp(sprintf('Error within rpLibNodeComp function\n'));
+            end
+        else
+            disp(sprintf('rpLibElement returned invalid nodeHandle\n'));
+        end
+    else
+        disp(sprintf('Error within rpLibElement function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_node_id.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_node_id.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_node_id.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_node_id(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_node_id(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibNodeId\n'));
+    [nodeHandle,err] = rpLibElement(lib,path);
+    if ~err
+        if nodeHandle
+            [idStr,err] = rpLibNodeId(nodeHandle);
+            if ~err
+                disp(sprintf ('%s idStr = %s\n', path, idStr));
+            else
+                disp(sprintf('Error within rpLibNodeId function\n'));
+            end
+        else
+            disp(sprintf('rpLibElement returned invalid nodeHandle\n'));
+        end
+    else
+        disp(sprintf('Error within rpLibElement function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_node_type.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_node_type.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_node_type.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_node_type(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_node_type(lib,path)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibNodeType\n'));
+    [nodeHandle,err] = rpLibElement(lib,path);
+    if ~err
+        if nodeHandle
+            [typeStr,err] = rpLibNodeType(nodeHandle);
+            if ~err
+                disp(sprintf ('%s typeStr = %s\n', path, typeStr));
+            else
+                disp(sprintf('Error within rpLibNodeType function\n'));
+            end
+        else
+            disp(sprintf('rpLibElement returned invalid nodeHandle\n'));
+        end
+    else
+        disp(sprintf('Error within rpLibElement function\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_put.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_put.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_put.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_put(libHandle,path,value,id,append)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_put(libHandle,path,value,append)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibPut\n'));
+    [err] = rpLibPut(libHandle,path,value,append);
+    if ~err
+        [retStr, err] = rpLibGet(libHandle,path);
+        disp(sprintf ('retStr = %s\n',retStr));
+        if ~err
+            if strcmp(retStr,value)
+                disp(sprintf ('rpLibPut Successful\n'));
+            else
+                disp(sprintf ('rpLibPut FAILED\n'));
+            end
+        else
+            disp(sprintf ('rpLibGet returned Error\n'));
+        end
+    else
+        disp(sprintf('Error within rpLibPut\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_put_dbl.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_put_dbl.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_put_dbl.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_put_dbl(libHandle,path,value,append)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_put_dbl(libHandle,path,value,append)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibPutDouble\n'));
+    [err] = rpLibPutDouble(libHandle,path,value,append);
+    if ~err
+        [retVal, err] = rpLibGetDouble(libHandle,path);
+        disp(sprintf ('retVal = %e\n',retVal));
+        if ~err
+            if (retVal == value)
+                disp(sprintf ('rpLibPutDouble Successful\n'));
+            else
+                disp(sprintf ('rpLibPutDouble FAILED\n'));
+            end
+        else
+            disp(sprintf ('rpLibGetDouble returned Error\n'));
+        end
+    else
+        disp(sprintf('Error within rpLibPutDouble\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_put_str.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_put_str.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_put_str.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_put_str(libHandle,path,value,append)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_put_str(libHandle,path,value,append)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibPutString\n'));
+    [err] = rpLibPutString(libHandle,path,value,append);
+    if ~err
+        [retStr, err] = rpLibGet(libHandle,path);
+        disp(sprintf ('retStr = %s\n',retStr));
+        if ~err
+            if strcmp(retStr,value)
+                disp(sprintf ('rpLibPutString Successful\n'));
+            else
+                disp(sprintf ('rpLibPutString FAILED\n'));
+            end
+        else
+            disp(sprintf ('rpLibGet returned Error\n'));
+        end
+    else
+        disp(sprintf('Error within rpLibPutString\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_result.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_result.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_result.m	(revision 2040)
@@ -0,0 +1,24 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_result(lib)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_result(lib)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibResult\n'));
+    [err] = rpLibResult(lib);
+    if ~err
+        disp(sprintf ('rpLibResult Successful\n'));
+    else
+        disp(sprintf('Error within rpLibResult\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/matlab/test_xml.m
===================================================================
--- /branches/blt4/oldtest/src/matlab/test_xml.m	(revision 2040)
+++ /branches/blt4/oldtest/src/matlab/test_xml.m	(revision 2040)
@@ -0,0 +1,24 @@
+% ----------------------------------------------------------------------
+%  TEST: Matlab's Rappture Library Test Functions.
+%
+%   [err] = test_xml(lib)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_xml(lib)
+    err = 1;
+    disp(sprintf('\n\nTESTING rpLibXml\n'));
+    [retStr,err] = rpLibXml(lib);
+    if (~err)
+        disp(sprintf ('rpLibXml Successful: \n%s\n',retStr));
+    else
+        disp(sprintf('Error within rpLibXml\n'));
+    end
+return
Index: /branches/blt4/oldtest/src/octave/test_children.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_children.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_children.m	(revision 2040)
@@ -0,0 +1,35 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_children(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_children(lib,path)
+    err = 1;
+    prevNodeHandle = 0;
+    nodeHandle = -1;
+
+    printf("\n\nTESTING rpLibChildren\n");
+
+    while nodeHandle != 0
+        [nodeHandle,err] = rpLibChildren(lib,path,prevNodeHandle);
+        prevNodeHandle = nodeHandle;
+
+        if !err
+            if nodeHandle
+                [compStr,err] = rpLibNodeComp(nodeHandle);
+                printf ("%s compStr = %s\n", path, compStr);
+            end
+        else
+            printf("Error within rpLibChildren function\n");
+        end
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_children_bytype.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_children_bytype.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_children_bytype.m	(revision 2040)
@@ -0,0 +1,35 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_children_bytype(lib, path, type)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_children_bytype(lib,path,type)
+    err = 1;
+    prevNodeHandle = 0;
+    nodeHandle = -1;
+
+    printf("\n\nTESTING rpLibChildrenByType\n");
+
+    while nodeHandle != 0
+        [nodeHandle,err] = rpLibChildrenByType(lib,path,prevNodeHandle,type);
+        prevNodeHandle = nodeHandle;
+
+        if !err
+            if nodeHandle
+                [compStr,err] = rpLibNodeComp(nodeHandle);
+                printf ("%s compStr = %s\n", path, compStr);
+            end
+        else
+            printf("Error within rpLibChildrenByType function\n");
+        end
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_convert.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_convert.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_convert.m	(revision 2040)
@@ -0,0 +1,25 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_convert(fromVal, toUnitsName, showUnits)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_convert(fromVal, toUnitsName, showUnits)
+    err = 1;
+    printf("\n\nTESTING rpUnitsConvert: convert %s to %s, showUnits: %i\n", fromVal, toUnitsName, showUnits);
+
+    [retStr,err] = rpUnitsConvert(fromVal, toUnitsName, showUnits);
+    if !err
+        printf("%s = %s\n",fromVal,retStr);
+    else
+        printf("Error within rpUnitsConvert function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_convert_dbl.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_convert_dbl.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_convert_dbl.m	(revision 2040)
@@ -0,0 +1,25 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_convert_dbl(fromVal, toUnitsName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_convert_dbl(fromVal, toUnitsName)
+    err = 1;
+    printf("\n\nTESTING rpUnitsConvertDbl: convert %s to %s\n", fromVal, toUnitsName);
+
+    [retVal,err] = rpUnitsConvertDbl(fromVal, toUnitsName);
+    if !err
+        printf("%s = %e\n",fromVal,retVal);
+    else
+        printf("Error within rpUnitsConvertDbl function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_convert_obj_dbl.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_convert_obj_dbl.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_convert_obj_dbl.m	(revision 2040)
@@ -0,0 +1,25 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_convert_obj_dbl(fromVal, toUnitsName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_convert_dbl(fromVal, toUnitsName)
+    err = 1;
+    printf("\n\nTESTING rpUnitsConvertDbl: convert %s to %s\n", fromVal, toUnitsName);
+
+    [retVal,err] = rpUnitsConvertDbl(fromVal, toUnitsName);
+    if !err
+        printf("%s = %e\n",fromVal,retVal);
+    else
+        printf("Error within rpUnitsConvertDbl function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_convert_obj_str.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_convert_obj_str.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_convert_obj_str.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpElement\n");
+    [nodeHandle,err] = rpElement(lib,path);
+    if nodeHandle && !err
+        [compStr,err] = rpNodeComp(nodeHandle);
+        printf ("%s compStr = %s\n", path, compStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpNodeId(nodeHandle);
+        printf ("%s idStr   = %s\n", path, idStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpNodeType(nodeHandle);
+        printf ("%s typeStr = %s\n", path, typeStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        printf("Error within rpElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_convert_str.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_convert_str.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_convert_str.m	(revision 2040)
@@ -0,0 +1,25 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_convert(fromVal, toUnitsName, showUnits)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_convert_str(fromVal, toUnitsName, showUnits)
+    err = 1;
+    printf("\n\nTESTING rpUnitsConvertStr: convert %s to %s, showUnits: %i\n", fromVal, toUnitsName, showUnits);
+
+    [retStr,err] = rpUnitsConvertStr(fromVal, toUnitsName, showUnits);
+    if !err
+        printf("%s = %s\n",fromVal,retStr);
+    else
+        printf("Error within rpUnitsConvert function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_define_unit.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_define_unit.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_define_unit.m	(revision 2040)
@@ -0,0 +1,30 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_define_unit(unitSymbol, basisHandle)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_define_unit(unitSymbol, basisHandle)
+    err = 1;
+    printf("\n\nTESTING rpUnitsDefineUnit\n");
+    [unitsHandle,err] = rpUnitsDefineUnit(unitSymbol, basisHandle);
+    if !err
+
+        if unitsHandle
+            printf ("Successfully Created %s\n",unitSymbol);
+        else
+            printf ("FAILED Creating %s\n",unitSymbol);
+        end
+
+    else
+        printf("Error within rpUnitsDefineUnits function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_element.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_element.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_element.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpLibElement\n");
+    [nodeHandle,err] = rpLibElement(lib,path);
+    if nodeHandle && !err
+        [compStr,err] = rpLibNodeComp(nodeHandle);
+        printf ("%s compStr = %s\n", path, compStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpLibNodeId(nodeHandle);
+        printf ("%s idStr   = %s\n", path, idStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpLibNodeType(nodeHandle);
+        printf ("%s typeStr = %s\n", path, typeStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        printf("Error within rpLibElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_element_comp.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_element_comp.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_element_comp.m	(revision 2040)
@@ -0,0 +1,24 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_element_comp(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element_comp(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpLibElementAsComp\n");
+    [compStr,err] = rpLibElementAsComp(lib,path);
+    if compStr && !err
+        printf ("%s compStr = %s\n", path, compStr);
+    else
+        printf("Error within rpLibElementAsComp function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_element_id.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_element_id.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_element_id.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpElement\n");
+    [nodeHandle,err] = rpElement(lib,path);
+    if nodeHandle && !err
+        [compStr,err] = rpNodeComp(nodeHandle);
+        printf ("%s compStr = %s\n", path, compStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpNodeId(nodeHandle);
+        printf ("%s idStr   = %s\n", path, idStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpNodeType(nodeHandle);
+        printf ("%s typeStr = %s\n", path, typeStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        printf("Error within rpElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_element_object.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_element_object.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_element_object.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpElement\n");
+    [nodeHandle,err] = rpElement(lib,path);
+    if nodeHandle && !err
+        [compStr,err] = rpNodeComp(nodeHandle);
+        printf ("%s compStr = %s\n", path, compStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpNodeId(nodeHandle);
+        printf ("%s idStr   = %s\n", path, idStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpNodeType(nodeHandle);
+        printf ("%s typeStr = %s\n", path, typeStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        printf("Error within rpElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_element_type.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_element_type.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_element_type.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_element(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_element(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpElement\n");
+    [nodeHandle,err] = rpElement(lib,path);
+    if nodeHandle && !err
+        [compStr,err] = rpNodeComp(nodeHandle);
+        printf ("%s compStr = %s\n", path, compStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [idStr, err]  = rpNodeId(nodeHandle);
+        printf ("%s idStr   = %s\n", path, idStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+
+        [typeStr,err] = rpNodeType(nodeHandle);
+        printf ("%s typeStr = %s\n", path, typeStr);
+%        printf ("err = %i nodeHandle = %i\n",err,nodeHandle);
+    else
+        printf("Error within rpElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_find.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_find.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_find.m	(revision 2040)
@@ -0,0 +1,28 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_find(unitSymbol)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_find(unitSymbol)
+    err = 1;
+    printf("\n\nTESTING rpUnitsFind\n");
+    [nodeHandle,err] = rpUnitsFind(unitSymbol);
+    if !err
+        if nodeHandle
+            printf ("rpUnitsFind Successful\n");
+        else
+            printf ("rpUnitsFind FAILED\n");
+        end
+    else
+        printf("Error within rpElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_get.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_get.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_get.m	(revision 2040)
@@ -0,0 +1,28 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_get(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpGet\n");
+    [retStr,err] = rpLibGet(lib,path);
+    if !err
+        if retStr != ''
+            printf ("rpGet Successful: %s\n",retStr);
+        else
+            printf ("rpGet FAILED\n");
+        end
+    else
+        printf("Error within rpGet function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_get_basis.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_get_basis.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_get_basis.m	(revision 2040)
@@ -0,0 +1,36 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_get_basis(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_basis(unitName)
+    err = 1;
+    printf("\n\nTESTING rpUnitsGetBasis\n");
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if !err && unitHandle
+        [basisHandle,err] = rpUnitsGetBasis(unitHandle);
+        if !err
+            if basisHandle > 0
+                [retStr,err] = rpUnitsGetUnitsName(basisHandle);
+                printf ("basisHandle name = %s\n", retStr);
+            elseif basisHandle < 0
+                printf ("%s is a basis unit\n", unitName);
+            else
+                printf ("rpUnitsGetBasis FAILED\n");
+            end
+        else
+            printf("Error within rpUnitsGetBasis function\n");
+        end
+    else
+        printf ("rpUnitsGetBasis FAILED\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_get_double.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_get_double.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_get_double.m	(revision 2040)
@@ -0,0 +1,24 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_get_double(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_double(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpLibGetDouble\n");
+    [retVal,err] = rpLibGetDouble(lib,path);
+    if !err
+        printf ("rpLibGetDouble Successful: %e\n",retVal);
+    else
+        printf("Error within rpLibGetDouble function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_get_exponent.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_get_exponent.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_get_exponent.m	(revision 2040)
@@ -0,0 +1,29 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_get_exponent(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_exponent(unitName)
+    err = 1;
+    printf("\n\nTESTING rpUnitsGetExponent\n");
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if !err && unitHandle
+        [retVal,err] = rpUnitsGetExponent(unitHandle);
+        if !err
+            printf ("Exponent of %s = %e\n", unitName,retVal);
+        else
+            printf("Error within rpUnitsGetExponent function\n");
+        end
+    else
+        printf ("rpUnitsGetExponent FAILED\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_get_string.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_get_string.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_get_string.m	(revision 2040)
@@ -0,0 +1,28 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_get_string(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_string(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpLibGetString\n");
+    [retStr,err] = rpLibGetString(lib,path);
+    if !err
+        if retStr != ''
+            printf ("rpLibGetString Successful: %s\n",retStr);
+        else
+            printf ("rpLibGetString FAILED\n");
+        end
+    else
+        printf("Error within rpLibGetString function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_get_units.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_get_units.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_get_units.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_get_units(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_units(unitName)
+    err = 1;
+    printf("\n\nTESTING rpUnitsGetUnits\n");
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if !err && unitHandle
+        [retStr,err] = rpUnitsGetUnits(unitHandle);
+        if !err
+            if retStr != ''
+                printf ("units of %s = %s\n", unitName,retStr);
+            else
+                printf ("rpUnitsGetUnits FAILED\n");
+            end
+        else
+            printf("Error within rpUnitsGetUnits function\n");
+        end
+    else
+        printf ("rpUnitsFind FAILED while testing rpUnitsGetUnits\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_get_units_name.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_get_units_name.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_get_units_name.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_get_units_name(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_get_units_name(unitName)
+    err = 1;
+    printf("\n\nTESTING rpUnitsGetUnitsName\n");
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if !err && unitHandle
+        [retStr,err] = rpUnitsGetUnitsName(unitHandle);
+        if !err
+            if retStr != ''
+                printf ("units name of %s = %s\n", unitName,retStr);
+            else
+                printf ("rpUnitsGetUnitsName FAILED\n");
+            end
+        else
+            printf("Error within rpUnitsGetUnitsName function\n");
+        end
+    else
+        printf ("rpUnitsFind FAILED while testing rpUnitsGetUnitsName\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_make_metric.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_make_metric.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_make_metric.m	(revision 2040)
@@ -0,0 +1,39 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_make_metric(unitName)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_make_metric(unitName)
+    err = 1;
+    printf("\n\nTESTING rpUnitsMakeMetric\n");
+    [unitHandle,err] = rpUnitsFind(unitName);
+    if !err && unitHandle
+        [err] = rpUnitsMakeMetric(unitHandle);
+        if !err
+            [unitHandle,err] = rpUnitsFind(['c',unitName]);
+            if !err 
+                [retStr,err] = rpUnitsGetUnitsName(unitHandle);
+                if !err
+                    printf ("centi-%s = %s\n", unitName,retStr);
+                else
+                    printf("Error in rpUnitsGetUnitsName testing rpUnitsMakeMetric\n");
+                end
+            else
+                printf("Error in rpUnitsFind testing rpUnitsMakeMetric\n");
+            end
+        else
+            printf("Error within rpUnitsMakeMetric function\n");
+        end
+    else
+        printf ("rpUnitsFind FAILED while testing rpUnitsGetUnits\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_node_comp.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_node_comp.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_node_comp.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_node_comp(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_node_comp(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpLibNodeComp\n");
+    [nodeHandle,err] = rpLibElement(lib,path);
+    if !err
+        if nodeHandle
+            [compStr,err] = rpLibNodeComp(nodeHandle);
+            if !err
+                printf ("%s compStr = %s\n", path, compStr);
+            else
+                printf("Error within rpLibNodeComp function\n");
+            end
+        else
+            printf("rpLibElement returned invalid nodeHandle\n");
+        end
+    else
+        printf("Error within rpLibElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_node_id.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_node_id.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_node_id.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_node_id(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_node_id(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpLibNodeId\n");
+    [nodeHandle,err] = rpLibElement(lib,path);
+    if !err
+        if nodeHandle
+            [idStr,err] = rpLibNodeId(nodeHandle);
+            if !err
+                printf ("%s idStr = %s\n", path, idStr);
+            else
+                printf("Error within rpLibNodeId function\n");
+            end
+        else
+            printf("rpLibElement returned invalid nodeHandle\n");
+        end
+    else
+        printf("Error within rpLibElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_node_type.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_node_type.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_node_type.m	(revision 2040)
@@ -0,0 +1,33 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_node_type(lib, path)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_node_type(lib,path)
+    err = 1;
+    printf("\n\nTESTING rpLibNodeType\n");
+    [nodeHandle,err] = rpLibElement(lib,path);
+    if !err
+        if nodeHandle
+            [typeStr,err] = rpLibNodeType(nodeHandle);
+            if !err
+                printf ("%s typeStr = %s\n", path, typeStr);
+            else
+                printf("Error within rpLibNodeType function\n");
+            end
+        else
+            printf("rpLibElement returned invalid nodeHandle\n");
+        end
+    else
+        printf("Error within rpLibElement function\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_put.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_put.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_put.m	(revision 2040)
@@ -0,0 +1,39 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_put(libHandle,path,value,id,append)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_put(libHandle,path,value,id,append)
+    err = 1;
+    printf("\n\nTESTING rpLibPut\n");
+    [err] = rpLibPut(libHandle,path,value,id,append);
+    if !err
+        if id != ''
+            pathID = [path,'(',id,')']
+        else
+            pathID = path
+        end
+        [retStr, err] = rpLibGet(libHandle,pathID);
+        printf ("retStr = %s\n",retStr);
+        if !err
+            if (retStr != '') && (retStr == value)
+                printf ("rpLibPut Successful\n");
+            else
+                printf ("rpLibPut FAILED\n");
+            end
+        else
+            printf ("rpLibGet returned Error\n");
+        end
+    else
+        printf("Error within rpLibPut\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_put_dbl.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_put_dbl.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_put_dbl.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_put_dbl(libHandle,path,value,append)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_put_dbl(libHandle,path,value,append)
+    err = 1;
+    printf("\n\nTESTING rpLibPutDouble\n");
+    [err] = rpLibPutDouble(libHandle,path,value,append);
+    if !err
+        [retVal, err] = rpLibGetDouble(libHandle,path);
+        printf ("retVal = %e\n",retVal);
+        if !err
+            if (retVal == value)
+                printf ("rpLibPutDouble Successful\n");
+            else
+                printf ("rpLibPutDouble FAILED\n");
+            end
+        else
+            printf ("rpLibGetDouble returned Error\n");
+        end
+    else
+        printf("Error within rpLibPutDouble\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_put_str.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_put_str.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_put_str.m	(revision 2040)
@@ -0,0 +1,34 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_put_str(libHandle,path,value,append)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_put_str(libHandle,path,value,append)
+    err = 1;
+    printf("\n\nTESTING rpLibPutString\n");
+    [err] = rpLibPutString(libHandle,path,value,append);
+    if !err
+        [retStr, err] = rpLibGet(libHandle,path);
+        printf ("retStr = %s\n",retStr);
+        if !err
+            if (retStr != '') && (retStr == value)
+                printf ("rpLibPutString Successful\n");
+            else
+                printf ("rpLibPutString FAILED\n");
+            end
+        else
+            printf ("rpLibGet returned Error\n");
+        end
+    else
+        printf("Error within rpLibPutString\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_result.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_result.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_result.m	(revision 2040)
@@ -0,0 +1,24 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_result(lib)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_result(lib)
+    err = 1;
+    printf("\n\nTESTING rpLibResult\n");
+    [err] = rpLibResult(lib);
+    if !err
+        printf ("rpLibResult Successful\n");
+    else
+        printf("Error within rpLibResult\n");
+    end
+end
Index: /branches/blt4/oldtest/src/octave/test_xml.m
===================================================================
--- /branches/blt4/oldtest/src/octave/test_xml.m	(revision 2040)
+++ /branches/blt4/oldtest/src/octave/test_xml.m	(revision 2040)
@@ -0,0 +1,24 @@
+% ----------------------------------------------------------------------
+%  TEST: Octave's Rappture Library Test Functions.
+%
+%   [err] = test_xml(lib)
+%
+%
+% ======================================================================
+%  AUTHOR:  Derrick Kearney, Purdue University
+%  Copyright (c) 2004-2005  Purdue Research Foundation
+%
+%  See the file "license.terms" for information on usage and
+%  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+% ======================================================================
+
+function [err] = test_xml(lib)
+    err = 1;
+    printf("\n\nTESTING rpLibXml\n");
+    [retStr,err] = rpLibXml(lib);
+    if !err
+        printf ("rpLibXml Successful: \n%s\n",retStr);
+    else
+        printf("Error within rpLibXml\n");
+    end
+end
Index: /branches/blt4/oldtest/src/rappture_example.c
===================================================================
--- /branches/blt4/oldtest/src/rappture_example.c	(revision 2040)
+++ /branches/blt4/oldtest/src/rappture_example.c	(revision 2040)
@@ -0,0 +1,230 @@
+/*
+ * ======================================================================
+ *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include "../include/rappture_interface.h"
+
+/* fix buffer overflow possibility*/
+char* null_terminate(char* inStr, int len)
+{
+    int retVal = 0;
+    char* newStr = NULL;
+    char* current = NULL;
+
+    if (inStr) {
+
+        current = inStr+len-1;
+
+        while ((len > 0) && (isspace(*(current)))) {
+            // dont strip off newlines
+
+            if ( (*(current) == '\f')
+              || (*(current) == '\n')
+              || (*(current) == '\r')
+              || (*(current) == '\t')
+              || (*(current) == '\v') )
+            {
+                break;
+            }
+
+            if (--len) {
+                current--;
+            }
+        }
+
+        newStr = (char*) calloc(len,(sizeof(char)));
+        strncpy(newStr,inStr,len);
+        *(newStr+len) = '\0';
+
+        retVal++;
+    }
+
+    // return retVal;
+
+    return newStr;
+}
+
+
+int main(int argc, char * argv[])
+{
+
+    PyObject* rpClass = NULL;
+    PyObject* lib = NULL;
+
+    // char* filePath = "/home/derrick/playground/rappture_fortran/xml_files/driver_big.xml";
+    // char* filePath = NULL; // "/home/derrick/playground/rappture_fortran/xml_files/driver_big.xml";
+    const char* xmlText = NULL;
+
+    // filePath = (char*) calloc(67,sizeof(char));
+
+    char* filePath2 = "/home/derrick/playground/rappture_fortran/xml_files/driver_big.xml     ";
+    char* filePath = null_terminate(filePath2,70);
+//    char* filePath = "/home/derrick/playground/rappture_fortran/xml_files/driver_small.xml";
+
+    printf("filePath = :%s:\n",filePath);
+
+    //scanf("%66c", filePath );
+    // scanf("%70c", filePath );
+    
+    // initialize the interpreter
+    Py_Initialize();
+
+    rpClass = importRappture();
+    if (rpClass) {
+        printf("created rappture object\n");
+        lib = createRapptureObj(rpClass, filePath);
+        Py_DECREF(rpClass);
+
+        if (lib) {
+
+            // test lib.xml()
+            printf("test lib.xml()\n");
+            
+            xmlText = rpXml(lib);
+            if (xmlText) {
+                printf("\nXML FILE\n\n%s\n\n",xmlText);
+            }
+
+            printf("\n");
+
+            // test lib.get("...")
+            xmlText = rpGet(lib, "input.(ambient).(temperature).current");
+            if (xmlText) {
+                printf("xmlText = %s\n", xmlText);
+            }
+
+
+            Py_DECREF(lib);
+        }
+    }
+    
+    // shut down the interpreter
+    Py_Finalize();
+    return 0;
+}
+
+/*
+ *
+python notes
+
+>>> print lib.xml()
+<?xml version="1.0" ?>
+<nanohub xmlns="http://www.nanohub.org" xmlns:class="http://www.nanohub.org">
+  <purdue>
+    <class class:number="101" class:school="ECE">
+      <name>Nanotechnology 101</name>
+      <desc>Introduction to Nanotechnology</desc>
+    </class>
+  <class id="NANO512"><name>Nanotechnology 512</name><desc>Not so intro to Nanotech</desc></class></purdue>
+</nanohub>
+>>> lib.children('purdue','component')
+[u'class', 'class(NANO512)']
+>>> lib.children('purdue','type')
+[u'class', 'class']
+>>> lib.children('purdue','id')
+[u'class', 'NANO512']
+>>> lib.children('purdue','object')
+[<Rappture.library.library instance at 0xb7d2b32c>, <Rappture.library.library instance at 0xb7d2b42c>]
+>>> lib.children('class', 'component')
+[u'name', u'desc']
+>>> lib.children('name', 'component')
+[]
+>>> lib.children('desc', 'component')
+[]
+>>> 
+>>> 
+>>> lib.element('purdue','component')
+u'purdue'
+>>> lib.element('class','component')
+u'class'
+>>> lib.element('class(NANO512)','component')
+'class(NANO512)'
+>>> 
+>>> lib.element('purdue','type')
+u'purdue'
+>>> lib.element('class','type')
+u'class'
+>>> lib.element('class(NANO512)','type')
+'class'
+>>> 
+>>> lib.element('purdue','id')
+u'purdue'
+>>> lib.element('class','id')
+u'class'
+>>> lib.element('class(NANO512)','id')
+'NANO512'
+>>> lib.get('purdue.class(NANO512).name')
+'Nanotechnology 512'
+>>> lib.get('purdue.class.name')
+u'Nanotechnology 101'
+>>> lib.put('uiuc.class(NANO500).name','Nanotechnology 500')
+>>> lib.put('uiuc.class(NANO500).desc','Carbon NanoTubes')
+>>> print lib.xml()
+<?xml version="1.0" ?>
+<nanohub xmlns="http://www.nanohub.org" xmlns:class="http://www.nanohub.org">
+  <purdue>
+    <class class:number="101" class:school="ECE">
+      <name>Nanotechnology 101</name>
+      <desc>Introduction to Nanotechnology</desc>
+    </class>
+  <class id="NANO512"><name>Nanotechnology 512</name><desc>Not so intro to Nanotech</desc></class></purdue>
+<uiuc><class id="NANO500"><name>Nanotechnology 500</name><desc>Carbon NanoTubes</desc></class></uiuc></nanohub>
+>>> nano500 = lib.element('class(NANO500)')
+>>> nano500.get('name')
+'Nanotechnology 500'
+>>> lib.put('sdsc',nano500)
+>>> print lib.xml()
+<?xml version="1.0" ?>
+<nanohub xmlns="http://www.nanohub.org" xmlns:class="http://www.nanohub.org">
+  <purdue>
+    <class class:number="101" class:school="ECE">
+      <name>Nanotechnology 101</name>
+      <desc>Introduction to Nanotechnology</desc>
+    </class>
+    <class id="NANO512">
+      <name>Nanotechnology 512</name>
+      <desc>Not so intro to Nanotech</desc>
+    </class>
+  </purdue>
+  <uiuc/>
+  <sdsc>
+    <class id="NANO500">
+      <name>Nanotechnology 500</name>
+      <desc>hi</desc>
+    </class>
+  </sdsc>
+</nanohub>
+>>> 
+>>> lib.put('uw',nano500)
+>>> print lib.xml()
+<?xml version="1.0" ?>
+<nanohub xmlns="http://www.nanohub.org" xmlns:class="http://www.nanohub.org">
+  <purdue>
+    <class class:number="101" class:school="ECE">
+      <name>Nanotechnology 101</name>
+      <desc>Introduction to Nanotechnology</desc>
+    </class>
+    <class id="NANO512">
+      <name>Nanotechnology 512</name>
+      <desc>Not so intro to Nanotech</desc>
+    </class>
+  </purdue>
+  <uiuc/>
+  <sdsc/>
+  <uw>
+    <class id="NANO500">
+      <name>Nanotechnology 500</name>
+      <desc>hi</desc>
+    </class>
+  </uw>
+</nanohub>
+>>> 
+
+
+*/
+
+
