Print

Print


Commit in lcsim/test/org/lcsim/util/lcio on MAIN
CalorimeterHitIOTest.java+13-31.6 -> 1.7
check getRawEnergy and getCorrectedEnergy methods

lcsim/test/org/lcsim/util/lcio
CalorimeterHitIOTest.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- CalorimeterHitIOTest.java	5 May 2010 16:18:20 -0000	1.6
+++ CalorimeterHitIOTest.java	7 May 2010 20:55:53 -0000	1.7
@@ -19,7 +19,7 @@
  * to a file, read back in, and checked for correctness.
  *
  * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: CalorimeterHitIOTest.java,v 1.6 2010/05/05 16:18:20 ngraf Exp $
+ * @version $Id: CalorimeterHitIOTest.java,v 1.7 2010/05/07 20:55:53 ngraf Exp $
  */
 public class CalorimeterHitIOTest extends TestCase
 {
@@ -101,8 +101,18 @@
                }
             }
             
-            // Check that the raw energies are equal.
-            assertEquals("rawEnergy not equal", hit.getRawEnergy(), testhit.getRawEnergy());
+            try
+               {
+                  hit.getRawEnergy();
+                  assertTrue("getRawEnergy should have thrown an exception",0==1);
+               }
+               catch (Exception x)
+               {
+                  // OK.
+               }
+
+            // Check that the energies are equal.
+            assertEquals("energy not equal", hit.getCorrectedEnergy(), testhit.getCorrectedEnergy());
 
             // Check that times are equal.
             if (LCIOUtil.bitTest(flag,LCIOConstants.RCHBIT_TIME))
CVSspam 0.2.8