Author: sebb
Date: Wed Nov  5 09:52:18 2008
New Revision: 711636

URL: http://svn.apache.org/viewvc?rev=711636&view=rev
Log:
Replace local constants with ones from Short class

Modified:
    
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java?rev=711636&r1=711635&r2=711636&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java
 Wed Nov  5 09:52:18 2008
@@ -55,24 +55,24 @@
         assertEquals(-1, ba[0]);
         assertEquals(-1, ba[1]);
 
-        ba = 
TCPClientDecorator.intToByteArray(TCPClientDecorator.SHORT_MAX_VALUE, len);
+        ba = TCPClientDecorator.intToByteArray(Short.MAX_VALUE, len);
         assertEquals(len, ba.length);
         assertEquals(127, ba[0]);
         assertEquals(-1, ba[1]);
         
-        ba = 
TCPClientDecorator.intToByteArray(TCPClientDecorator.SHORT_MIN_VALUE, len);
+        ba = TCPClientDecorator.intToByteArray(Short.MIN_VALUE, len);
         assertEquals(len, ba.length);
         assertEquals(-128, ba[0]);
         assertEquals(0, ba[1]);
         
         try {
-            ba = 
TCPClientDecorator.intToByteArray(TCPClientDecorator.SHORT_MIN_VALUE-1, len);
+            ba = TCPClientDecorator.intToByteArray(Short.MIN_VALUE-1, len);
             fail();
         } catch (IllegalArgumentException iae) {
         }
         
         try {
-            ba = 
TCPClientDecorator.intToByteArray(TCPClientDecorator.SHORT_MAX_VALUE+1, len);
+            ba = TCPClientDecorator.intToByteArray(Short.MAX_VALUE+1, len);
             fail();
         } catch (IllegalArgumentException iae) {
         }
@@ -179,8 +179,8 @@
 
     
     public void testLoopBack() throws Exception {
-        assertEquals(TCPClientDecorator.SHORT_MIN_VALUE, 
TCPClientDecorator.byteArrayToInt(TCPClientDecorator.intToByteArray(TCPClientDecorator.SHORT_MIN_VALUE,
 2)));      
-        assertEquals(TCPClientDecorator.SHORT_MAX_VALUE, 
TCPClientDecorator.byteArrayToInt(TCPClientDecorator.intToByteArray(TCPClientDecorator.SHORT_MAX_VALUE,
 2)));      
+        assertEquals(Short.MIN_VALUE, 
TCPClientDecorator.byteArrayToInt(TCPClientDecorator.intToByteArray(Short.MIN_VALUE,
 2)));      
+        assertEquals(Short.MAX_VALUE, 
TCPClientDecorator.byteArrayToInt(TCPClientDecorator.intToByteArray(Short.MAX_VALUE,
 2)));      
         assertEquals(Integer.MIN_VALUE, 
TCPClientDecorator.byteArrayToInt(TCPClientDecorator.intToByteArray(Integer.MIN_VALUE,
 4)));      
         assertEquals(Integer.MAX_VALUE, 
TCPClientDecorator.byteArrayToInt(TCPClientDecorator.intToByteArray(Integer.MAX_VALUE,
 4)));      
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to