diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-10-19 17:34:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-19 17:34:35 +0300 |
commit | 1e29ed0d7e5bc917d3953760ba9ecb924f1abec0 (patch) | |
tree | 92cf4969759f9a0caa53f212bfb7df8a5eff2799 /mcs | |
parent | 8af88bd0e6b315e307e1f6d3c1b16e7a5deddcc1 (diff) |
[System.Core] Remove duplicated test classes (#5829)
These tests classes are already included in the corlib test assembly.
Having them duplicated in System.Core causes issues in XA because
both test assemblies are in the same process.
To solve this we introduce abstract *TestBase classes that we can
share between the test assemblies and only mark the concrete test
class implementations with [TestFixture]
Diffstat (limited to 'mcs')
24 files changed, 261 insertions, 37 deletions
diff --git a/mcs/class/System.Core/System.Core_test.dll.sources b/mcs/class/System.Core/System.Core_test.dll.sources index 01ae2e35ae3..2ecd0f11230 100644 --- a/mcs/class/System.Core/System.Core_test.dll.sources +++ b/mcs/class/System.Core/System.Core_test.dll.sources @@ -61,11 +61,11 @@ System.Linq.Expressions/ExpressionTest_TypeIs.cs System.Linq.Expressions/ExpressionTest_UnaryPlus.cs System.Linq.Expressions/ExpressionTest_Utils.cs System.Threading/ReaderWriterLockSlimTest.cs -../../corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs -../../corlib/Test/System.Security.Cryptography/SHA1Test.cs -../../corlib/Test/System.Security.Cryptography/SHA256Test.cs -../../corlib/Test/System.Security.Cryptography/SHA384Test.cs -../../corlib/Test/System.Security.Cryptography/SHA512Test.cs +../../corlib/Test/System.Security.Cryptography/HashAlgorithmTestBase.cs +../../corlib/Test/System.Security.Cryptography/SHA1TestBase.cs +../../corlib/Test/System.Security.Cryptography/SHA256TestBase.cs +../../corlib/Test/System.Security.Cryptography/SHA384TestBase.cs +../../corlib/Test/System.Security.Cryptography/SHA512TestBase.cs System.Security.Cryptography/AesCryptoServiceProviderTest.cs System.Security.Cryptography/AesManagedTest.cs System.Security.Cryptography/CngAlgorithmTest.cs diff --git a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA1CngTest.cs b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA1CngTest.cs index 5164c4d9b3b..e132f5e5093 100644 --- a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA1CngTest.cs +++ b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA1CngTest.cs @@ -25,7 +25,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] - public class SHA1CngTest : SHA1Test { + public class SHA1CngTest : SHA1TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CngTest.cs b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CngTest.cs index 2801868212b..927ef29e52c 100644 --- a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CngTest.cs +++ b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CngTest.cs @@ -25,7 +25,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] - public class SHA256CngTest : SHA256Test { + public class SHA256CngTest : SHA256TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CryptoServiceProviderTest.cs b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CryptoServiceProviderTest.cs index 7edba2f9d23..b79ecf1a72e 100644 --- a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CryptoServiceProviderTest.cs +++ b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CryptoServiceProviderTest.cs @@ -25,7 +25,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] - public class SHA256CryptoServiceProviderTest : SHA256Test { + public class SHA256CryptoServiceProviderTest : SHA256TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CngTest.cs b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CngTest.cs index a7992ee86eb..e9f212412e4 100644 --- a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CngTest.cs +++ b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CngTest.cs @@ -25,7 +25,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] - public class SHA384CngTest : SHA384Test { + public class SHA384CngTest : SHA384TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CryptoServiceProviderTest.cs b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CryptoServiceProviderTest.cs index 900951ac573..6b1079b8521 100644 --- a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CryptoServiceProviderTest.cs +++ b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CryptoServiceProviderTest.cs @@ -25,7 +25,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] - public class SHA384CryptoServiceProviderTest : SHA384Test { + public class SHA384CryptoServiceProviderTest : SHA384TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CngTest.cs b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CngTest.cs index 3cec13ca2cb..c5999b8048b 100644 --- a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CngTest.cs +++ b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CngTest.cs @@ -25,7 +25,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] - public class SHA512CngTest : SHA512Test { + public class SHA512CngTest : SHA512TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CryptoServiceProviderTest.cs b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CryptoServiceProviderTest.cs index 512717c0bf3..83c90f5056a 100644 --- a/mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CryptoServiceProviderTest.cs +++ b/mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CryptoServiceProviderTest.cs @@ -25,7 +25,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] - public class SHA512CryptoServiceProviderTest : SHA512Test { + public class SHA512CryptoServiceProviderTest : SHA512TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTestBase.cs index f5ba3ecf91b..fdcb6088331 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTestBase.cs @@ -1,5 +1,5 @@ // -// HashAlgorithmTest.cs - NUnit Test Cases for HashAlgorithm +// HashAlgorithmTestBase.cs - NUnit Test Cases for HashAlgorithm // // Author: // Sebastien Pouliot <sebastien@ximian.com> @@ -38,8 +38,9 @@ namespace MonoTests.System.Security.Cryptography { // HashAlgorithm is a abstract class - so most of it's functionality wont // be tested here (but will be in its descendants). -[TestFixture] -public class HashAlgorithmTest { +// we can't make this a [TestFixture] since the class is shared with System.Core +// and causes issues in XA where these are in the same process. +public abstract class HashAlgorithmTestBase { protected HashAlgorithm hash; diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTestImpl.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTestImpl.cs new file mode 100644 index 00000000000..6077de019a6 --- /dev/null +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTestImpl.cs @@ -0,0 +1,42 @@ +// +// HashAlgorithmTestImpl.cs +// +// Author: +// Alexander Köplinger <alkpli@microsoft.com> +// +// Copyright (C) 2017 Microsoft +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using NUnit.Framework; +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace MonoTests.System.Security.Cryptography { + + [TestFixture] + public class HashAlgorithmTestImpl : HashAlgorithmTestBase { + + } + +} diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/KeyedHashAlgorithmTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/KeyedHashAlgorithmTest.cs index 7bd79f62e9b..87517543f92 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/KeyedHashAlgorithmTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/KeyedHashAlgorithmTest.cs @@ -19,7 +19,7 @@ namespace MonoTests.System.Security.Cryptography { // be tested here (but will be in its descendants). [TestFixture] -public class KeyedHashAlgorithmTest : HashAlgorithmTest { +public class KeyedHashAlgorithmTest : HashAlgorithmTestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA1CryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA1CryptoServiceProviderTest.cs index 882117029b0..4351517241d 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SHA1CryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA1CryptoServiceProviderTest.cs @@ -23,7 +23,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] -public class SHA1CryptoServiceProviderTest : SHA1Test { +public class SHA1CryptoServiceProviderTest : SHA1TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA1Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA1TestBase.cs index c32ae11ba27..dc29fb161f7 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SHA1Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA1TestBase.cs @@ -1,5 +1,5 @@ // -// SHA1Test.cs - NUnit Test Cases for SHA1 +// SHA1TestBase.cs - NUnit Test Cases for SHA1 // // Author: // Sebastien Pouliot <sebastien@ximian.com> @@ -24,8 +24,9 @@ namespace MonoTests.System.Security.Cryptography // SHA1 is a abstract class - so most of the test included here wont be tested // on the abstract class but should be tested in ALL its descendants. -[TestFixture] -public class SHA1Test : HashAlgorithmTest { +// we can't make this a [TestFixture] since the class is shared with System.Core +// and causes issues in XA where these are in the same process. +public abstract class SHA1TestBase : HashAlgorithmTestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA1TestImpl.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA1TestImpl.cs new file mode 100644 index 00000000000..e90d9f72946 --- /dev/null +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA1TestImpl.cs @@ -0,0 +1,43 @@ +// +// SHA1TestImpl.cs +// +// Author: +// Alexander Köplinger <alkpli@microsoft.com> +// +// Copyright (C) 2017 Microsoft +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using NUnit.Framework; +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace MonoTests.System.Security.Cryptography +{ + + [TestFixture] + public class SHA1TestImpl : SHA1TestBase { + + } + +}
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA256ManagedTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA256ManagedTest.cs index 4247d7a9f94..155d3418edb 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SHA256ManagedTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA256ManagedTest.cs @@ -23,7 +23,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] -public class SHA256ManagedTest : SHA256Test { +public class SHA256ManagedTest : SHA256TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA256Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA256TestBase.cs index 88a3dee9836..9186c519f58 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SHA256Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA256TestBase.cs @@ -1,5 +1,5 @@ // -// SHA256Test.cs - NUnit Test Cases for SHA256 +// SHA256TestBase.cs - NUnit Test Cases for SHA256 // // Author: // Sebastien Pouliot <sebastien@ximian.com> @@ -23,8 +23,9 @@ namespace MonoTests.System.Security.Cryptography { // SHA256 is a abstract class - so most of the test included here wont be tested // on the abstract class but should be tested in ALL its descendants. -[TestFixture] -public class SHA256Test : HashAlgorithmTest { +// we can't make this a [TestFixture] since the class is shared with System.Core +// and causes issues in XA where these are in the same process. +public abstract class SHA256TestBase : HashAlgorithmTestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA256TestImpl.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA256TestImpl.cs new file mode 100644 index 00000000000..95d1509df84 --- /dev/null +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA256TestImpl.cs @@ -0,0 +1,43 @@ +// +// SHA256TestImpl.cs +// +// Author: +// Alexander Köplinger <alkpli@microsoft.com> +// +// Copyright (C) 2017 Microsoft +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using NUnit.Framework; +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace MonoTests.System.Security.Cryptography +{ + + [TestFixture] + public class SHA256TestImpl : SHA256TestBase { + + } + +}
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA384ManagedTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA384ManagedTest.cs index a0beba88383..289bfe363c7 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SHA384ManagedTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA384ManagedTest.cs @@ -23,7 +23,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] -public class SHA384ManagedTest : SHA384Test { +public class SHA384ManagedTest : SHA384TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA384Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA384TestBase.cs index 2c98fdfe258..723d2660b84 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SHA384Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA384TestBase.cs @@ -1,5 +1,5 @@ // -// SHA384Test.cs - NUnit Test Cases for SHA384 +// SHA384TestBase.cs - NUnit Test Cases for SHA384 // // Author: // Sebastien Pouliot <sebastien@ximian.com> @@ -23,8 +23,9 @@ namespace MonoTests.System.Security.Cryptography { // SHA384 is a abstract class - so most of the test included here wont be tested // on the abstract class but should be tested in ALL its descendants. -[TestFixture] -public class SHA384Test : HashAlgorithmTest { +// we can't make this a [TestFixture] since the class is shared with System.Core +// and causes issues in XA where these are in the same process. +public abstract class SHA384TestBase : HashAlgorithmTestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA384TestImpl.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA384TestImpl.cs new file mode 100644 index 00000000000..13f4f9374d1 --- /dev/null +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA384TestImpl.cs @@ -0,0 +1,43 @@ +// +// SHA384TestImpl.cs +// +// Author: +// Alexander Köplinger <alkpli@microsoft.com> +// +// Copyright (C) 2017 Microsoft +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using NUnit.Framework; +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace MonoTests.System.Security.Cryptography +{ + + [TestFixture] + public class SHA384TestImpl : SHA384TestBase { + + } + +}
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA512ManagedTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA512ManagedTest.cs index b372affad29..54395ea1ff1 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SHA512ManagedTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA512ManagedTest.cs @@ -23,7 +23,7 @@ namespace MonoTests.System.Security.Cryptography { // same results (hence should run a common set of unit tests). [TestFixture] -public class SHA512ManagedTest : SHA512Test { +public class SHA512ManagedTest : SHA512TestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA512Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA512TestBase.cs index a8096271ad5..13456d8b4de 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SHA512Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA512TestBase.cs @@ -1,5 +1,5 @@ // -// SHA512Test.cs - NUnit Test Cases for SHA512 +// SHA512TestBase.cs - NUnit Test Cases for SHA512 // // Author: // Sebastien Pouliot <sebastien@ximian.com> @@ -23,8 +23,9 @@ namespace MonoTests.System.Security.Cryptography { // SHA512 is a abstract class - so most of the test included here wont be tested // on the abstract class but should be tested in ALL its descendants. -[TestFixture] -public class SHA512Test : HashAlgorithmTest { +// we can't make this a [TestFixture] since the class is shared with System.Core +// and causes issues in XA where these are in the same process. +public abstract class SHA512TestBase : HashAlgorithmTestBase { [SetUp] public override void SetUp () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SHA512TestImpl.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SHA512TestImpl.cs new file mode 100644 index 00000000000..bf1ffeb11f1 --- /dev/null +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SHA512TestImpl.cs @@ -0,0 +1,43 @@ +// +// SHA512TestImpl.cs +// +// Author: +// Alexander Köplinger <alkpli@microsoft.com> +// +// Copyright (C) 2017 Microsoft +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using NUnit.Framework; +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace MonoTests.System.Security.Cryptography +{ + + [TestFixture] + public class SHA512TestImpl : SHA512TestBase { + + } + +}
\ No newline at end of file diff --git a/mcs/class/corlib/corlib_test.dll.sources b/mcs/class/corlib/corlib_test.dll.sources index f91fcfee2e1..4d5bd06fa47 100644 --- a/mcs/class/corlib/corlib_test.dll.sources +++ b/mcs/class/corlib/corlib_test.dll.sources @@ -261,7 +261,8 @@ System.Security.Cryptography/DSASignatureDeformatterTest.cs System.Security.Cryptography/DSASignatureFormatterTest.cs System.Security.Cryptography/DSATest.cs System.Security.Cryptography/FromBase64Transform.cs -System.Security.Cryptography/HashAlgorithmTest.cs +System.Security.Cryptography/HashAlgorithmTestBase.cs +System.Security.Cryptography/HashAlgorithmTestImpl.cs System.Security.Cryptography/HMACMD5Test.cs System.Security.Cryptography/HMACRIPEMD160Test.cs System.Security.Cryptography/HMACSHA1Test.cs @@ -294,13 +295,17 @@ System.Security.Cryptography/RSAPKCS1SignatureDeformatterTest.cs System.Security.Cryptography/RSAPKCS1SignatureFormatterTest.cs System.Security.Cryptography/RSATest.cs System.Security.Cryptography/SHA1CryptoServiceProviderTest.cs -System.Security.Cryptography/SHA1Test.cs +System.Security.Cryptography/SHA1TestBase.cs +System.Security.Cryptography/SHA1TestImpl.cs System.Security.Cryptography/SHA256ManagedTest.cs -System.Security.Cryptography/SHA256Test.cs +System.Security.Cryptography/SHA256TestBase.cs +System.Security.Cryptography/SHA256TestImpl.cs System.Security.Cryptography/SHA384ManagedTest.cs -System.Security.Cryptography/SHA384Test.cs +System.Security.Cryptography/SHA384TestBase.cs +System.Security.Cryptography/SHA384TestImpl.cs System.Security.Cryptography/SHA512ManagedTest.cs -System.Security.Cryptography/SHA512Test.cs +System.Security.Cryptography/SHA512TestBase.cs +System.Security.Cryptography/SHA512TestImpl.cs System.Security.Cryptography/SignatureDescriptionTest.cs System.Security.Cryptography/SymmetricAlgorithmTest.cs System.Security.Cryptography/SymmetricAlgorithm2Test.cs |