summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMorgan Brown <morganbr@users.noreply.github.com>2017-05-26 17:45:37 -0700
committerGitHub <noreply@github.com>2017-05-26 17:45:37 -0700
commitb479cee9fdcee2cb4035fda788d34e724e32a222 (patch)
treef6e03e2ff5da5554751230fdda129a3a74eaf675 /tests
parentc1bf59fbe4f0c54020ad9990bad33ccda4ae4519 (diff)
downloadcoreclr-b479cee9fdcee2cb4035fda788d34e724e32a222.tar.gz
coreclr-b479cee9fdcee2cb4035fda788d34e724e32a222.tar.bz2
coreclr-b479cee9fdcee2cb4035fda788d34e724e32a222.zip
ISerializable cleanup (#11873)
Changes to throw PlatformNotSupportedException from ISerializable.GetObjectData and serialization constructors on non-Serializable types. Also removes private serialization constructors and some unneeded code that was used to support serializing non-serializable types. A few tests testing GetObjectData implementations are also removed. For Exception types, we call base instead of throwing from GetObjectData to be consistent with the many Exceptions that don't override GetObjectData
Diffstat (limited to 'tests')
-rw-r--r--tests/src/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs21
1 files changed, 3 insertions, 18 deletions
diff --git a/tests/src/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs b/tests/src/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs
index 29fb347ae1..00f1db420c 100644
--- a/tests/src/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs
+++ b/tests/src/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs
@@ -25,27 +25,12 @@ class Test
{
// Console.WriteLine("Incorrect exception and/or message. Expected RuntimeWrappedException: An object that does not derive "+
// "from System.Exception has been wrapped in a RuntimeWrappedException.\n But actually got: " + ex.InnerException);
- retVal = -1;
+ return -1;
}
StreamingContext ctx;
-
-// TODO: Expose once we have access to FormatterConverter
-// var info = new SerializationInfo(typeof(RuntimeWrappedException), new FormatterConverter());
-// ex.GetObjectData(info,ctx);
-//
- try
- {
- ex.GetObjectData(null,ctx);
- }
- catch (ArgumentNullException ex1)
- {
- retVal = 100;
- }
- catch (Exception ex1)
- {
- retVal = -1;
- }
+
+ retVal = 100;
}