[jboss-cvs] JBoss Messaging SVN: r5788 - in branches/dotNetTest/dotnet: JBMClient/util and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 2 20:48:55 EST 2009


Author: clebert.suconic at jboss.com
Date: 2009-02-02 20:48:55 -0500 (Mon, 02 Feb 2009)
New Revision: 5788

Modified:
   branches/dotNetTest/dotnet/JBMClient/util/SimpleString.cs
   branches/dotNetTest/dotnet/JBMClientSolution.sln
   branches/dotNetTest/dotnet/JBMClientTest/util/SimpleStringTest.cs
Log:
a few fixes

Modified: branches/dotNetTest/dotnet/JBMClient/util/SimpleString.cs
===================================================================
--- branches/dotNetTest/dotnet/JBMClient/util/SimpleString.cs	2009-02-03 01:09:14 UTC (rev 5787)
+++ branches/dotNetTest/dotnet/JBMClient/util/SimpleString.cs	2009-02-03 01:48:55 UTC (rev 5788)
@@ -109,7 +109,7 @@
         {
             get
             {
-                return data.Length;
+                return data.Length >> 1;
             }
         }
 
@@ -237,7 +237,7 @@
             {
                 for (int i = 0; i < data.Length; i++)
                 {
-                    hash = 31 * hash + data[i];
+                    hash = (31 * hash + data[i]) % (int.MaxValue>>5);
                 }
             }
 

Modified: branches/dotNetTest/dotnet/JBMClientSolution.sln
===================================================================
--- branches/dotNetTest/dotnet/JBMClientSolution.sln	2009-02-03 01:09:14 UTC (rev 5787)
+++ branches/dotNetTest/dotnet/JBMClientSolution.sln	2009-02-03 01:48:55 UTC (rev 5788)
@@ -12,8 +12,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JBMClientTest", "JBMClientTest\JBMClientTest.csproj", "{D6A96159-0551-41C2-9E94-1F253F79AD39}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{7F446C32-5671-4A08-AAE8-EF38FD4A9CB2}"
-EndProject
 Global
 	GlobalSection(SubversionScc) = preSolution
 		Svn-Managed = True
@@ -32,10 +30,6 @@
 		{D6A96159-0551-41C2-9E94-1F253F79AD39}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D6A96159-0551-41C2-9E94-1F253F79AD39}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D6A96159-0551-41C2-9E94-1F253F79AD39}.Release|Any CPU.Build.0 = Release|Any CPU
-		{7F446C32-5671-4A08-AAE8-EF38FD4A9CB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{7F446C32-5671-4A08-AAE8-EF38FD4A9CB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{7F446C32-5671-4A08-AAE8-EF38FD4A9CB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{7F446C32-5671-4A08-AAE8-EF38FD4A9CB2}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Modified: branches/dotNetTest/dotnet/JBMClientTest/util/SimpleStringTest.cs
===================================================================
--- branches/dotNetTest/dotnet/JBMClientTest/util/SimpleStringTest.cs	2009-02-03 01:09:14 UTC (rev 5787)
+++ branches/dotNetTest/dotnet/JBMClientTest/util/SimpleStringTest.cs	2009-02-03 01:48:55 UTC (rev 5788)
@@ -74,7 +74,7 @@
                 s1.CharAt(-1);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -84,7 +84,7 @@
                 s1.CharAt(-2);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -94,7 +94,7 @@
                 s1.CharAt(s.Length);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -104,7 +104,7 @@
                 s1.CharAt(s.Length + 1);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -129,7 +129,7 @@
                 s1.SubSequence(-1, 2);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -139,7 +139,7 @@
                 s1.SubSequence(-4, -2);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -149,7 +149,7 @@
                 s1.SubSequence(0, s1.Length + 1);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -159,7 +159,7 @@
                 s1.SubSequence(0, s1.Length + 2);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -169,7 +169,7 @@
                 s1.SubSequence(5, 1);
                 fail("Should throw exception");
             }
-            catch (IndexOutOfRangeException e)
+            catch (IndexOutOfRangeException)
             {
                 //OK
             }
@@ -193,8 +193,12 @@
             SimpleString sameStr = new SimpleString("abcdef");
             SimpleString differentStr = new SimpleString("ghijk");
 
+            string tst = str.ToString();
+            tst.GetHashCode();
+
             assertTrue(str.GetHashCode() == sameStr.GetHashCode());
             assertFalse(str.GetHashCode() == differentStr.GetHashCode());
+
         }
 
         [Test]




More information about the jboss-cvs-commits mailing list