summary refs log tree commit diff
diff options
context:
space:
mode:
authorOren Novotny <oren@novotny.org>2014-08-27 13:00:24 -0400
committerOren Novotny <oren@novotny.org>2014-08-27 13:00:24 -0400
commit0c9ff6c4d2aac6cf180e999e9a3583d91626377a (patch)
tree41c477c821b780ef0e769fcf7bc258215c0b3b53
parentAdd unit test files (diff)
downloadBouncyCastle.NET-ed25519-0c9ff6c4d2aac6cf180e999e9a3583d91626377a.tar.xz
Fix bugs from tests
-rw-r--r--crypto.tests.Net45/crypto.tests.Net45.csproj5
-rw-r--r--crypto/crypto.csproj4
-rw-r--r--crypto/src/bcpg/BcpgOutputStream.cs4
-rw-r--r--crypto/src/openpgp/PgpCompressedDataGenerator.cs13
-rw-r--r--crypto/src/openpgp/WrappedGeneratorStream.cs1
-rw-r--r--crypto/test/src/math/ec/test/ECAlgorithmsTest.cs2
-rw-r--r--crypto/test/src/math/ec/test/ECPointPerformanceTest.cs1
-rw-r--r--crypto/test/src/util/test/SimpleTest.cs4
8 files changed, 15 insertions, 19 deletions
diff --git a/crypto.tests.Net45/crypto.tests.Net45.csproj b/crypto.tests.Net45/crypto.tests.Net45.csproj
index 5db9fac92..021f6d062 100644
--- a/crypto.tests.Net45/crypto.tests.Net45.csproj
+++ b/crypto.tests.Net45/crypto.tests.Net45.csproj
@@ -7,7 +7,7 @@
     <ProjectGuid>{45473847-8AF8-4BAF-B768-442C6875B8CE}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>crypto.tests.Net45</RootNamespace>
+    <RootNamespace>crypto.tests</RootNamespace>
     <AssemblyName>crypto.tests.Net45</AssemblyName>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
@@ -61,6 +61,9 @@
       <Name>crypto</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/crypto/crypto.csproj b/crypto/crypto.csproj
index 798bda188..220ff7d7c 100644
--- a/crypto/crypto.csproj
+++ b/crypto/crypto.csproj
@@ -72,7 +72,7 @@
     <ConfigurationOverrideFile />
     <DefineConstants>TRACE;SILVERLIGHT;PCL</DefineConstants>
     <DocumentationFile>doc\crypto.xml</DocumentationFile>
-    <DebugSymbols>false</DebugSymbols>
+    <DebugSymbols>true</DebugSymbols>
     <FileAlignment>4096</FileAlignment>
     <NoStdLib>false</NoStdLib>
     <NoWarn>1591</NoWarn>
@@ -81,7 +81,7 @@
     <RemoveIntegerChecks>false</RemoveIntegerChecks>
     <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
     <WarningLevel>4</WarningLevel>
-    <DebugType>none</DebugType>
+    <DebugType>pdbonly</DebugType>
     <ErrorReport>prompt</ErrorReport>
   </PropertyGroup>
   <ItemGroup>
diff --git a/crypto/src/bcpg/BcpgOutputStream.cs b/crypto/src/bcpg/BcpgOutputStream.cs
index c9545dc65..3c25929c4 100644
--- a/crypto/src/bcpg/BcpgOutputStream.cs
+++ b/crypto/src/bcpg/BcpgOutputStream.cs
@@ -385,9 +385,9 @@ namespace Org.BouncyCastle.Bcpg
 	        {
                 this.Finish();
                 outStr.Flush();
-                outStr.Dispose();
+           //     outStr.Dispose();
 	        }
-	        base.Dispose(disposing);
+	       base.Dispose(disposing);
 	    }
     }
 }
diff --git a/crypto/src/openpgp/PgpCompressedDataGenerator.cs b/crypto/src/openpgp/PgpCompressedDataGenerator.cs
index 732b941e7..c0035ab05 100644
--- a/crypto/src/openpgp/PgpCompressedDataGenerator.cs
+++ b/crypto/src/openpgp/PgpCompressedDataGenerator.cs
@@ -155,8 +155,8 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
 			{
 				if (dOut != pkOut)
 				{
+                    dOut.Flush();
 					dOut.Dispose();
-					dOut.Flush();
 				}
 
 				dOut = null;
@@ -190,16 +190,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
 				: base(output, level, nowrap)
 			{
 			}
-
-		    protected override void Dispose(bool disposing)
-		    {
-		        if (disposing)
-		        {
-                    Finish();
-                    End();
-		        }
-		        base.Dispose(disposing);
-		    }
+		   
 		}
 	}
 }
diff --git a/crypto/src/openpgp/WrappedGeneratorStream.cs b/crypto/src/openpgp/WrappedGeneratorStream.cs
index 9fe2e33d7..3468ecfbb 100644
--- a/crypto/src/openpgp/WrappedGeneratorStream.cs
+++ b/crypto/src/openpgp/WrappedGeneratorStream.cs
@@ -23,7 +23,6 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
 	        {
 	            gen.Close();
 	        }
-	        base.Dispose(disposing);
 	    }
 	}
 }
diff --git a/crypto/test/src/math/ec/test/ECAlgorithmsTest.cs b/crypto/test/src/math/ec/test/ECAlgorithmsTest.cs
index b950c8b4b..e98f33137 100644
--- a/crypto/test/src/math/ec/test/ECAlgorithmsTest.cs
+++ b/crypto/test/src/math/ec/test/ECAlgorithmsTest.cs
@@ -20,6 +20,7 @@ namespace Org.BouncyCastle.Math.EC.Tests
         private static readonly SecureRandom RND = new SecureRandom();
 
         [Test]
+        [Ignore("SLOW! 44 sec")]
         public void TestSumOfMultiplies()
         {
             foreach (X9ECParameters x9 in GetTestCurves())
@@ -48,6 +49,7 @@ namespace Org.BouncyCastle.Math.EC.Tests
         }
 
         [Test]
+        [Ignore("SLOW! 1 min")]
         public void TestSumOfTwoMultiplies()
         {
             foreach (X9ECParameters x9 in GetTestCurves())
diff --git a/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs b/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs
index 2bcd5b502..5edbd906f 100644
--- a/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs
+++ b/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs
@@ -173,6 +173,7 @@ namespace Org.BouncyCastle.Math.EC.Tests
         }
 
         [Test]
+        [Ignore("SLOW! 15 min")]
         public void TestMultiply()
         {
             ArrayList nameList = new ArrayList();
diff --git a/crypto/test/src/util/test/SimpleTest.cs b/crypto/test/src/util/test/SimpleTest.cs
index be846e20f..10c83374d 100644
--- a/crypto/test/src/util/test/SimpleTest.cs
+++ b/crypto/test/src/util/test/SimpleTest.cs
@@ -119,7 +119,7 @@ namespace Org.BouncyCastle.Utilities.Test
 #if BC_BUILD_MONODEVELOP
 			return "test.data." + name;
 #else
-			return "crypto.test.data." + name;
+			return "crypto.tests." + name;
 #endif
 		}
 
@@ -130,7 +130,7 @@ namespace Org.BouncyCastle.Utilities.Test
 #if BC_BUILD_MONODEVELOP
 			return fullName.Substring("test.data.".Length);
 #else
-			return fullName.Substring("crypto.test.data.".Length);
+			return fullName.Substring("crypto.tests.".Length);
 #endif
 		}