-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add CodeDom.CodeValidator tests and fix some bugs #39585
Conversation
src/System.CodeDom/tests/System/CodeDom/Compiler/CodeDomProviderTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small question, overall looks good
src/System.CodeDom/tests/System/CodeDom/Compiler/CodeDomProviderTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please fix the exception comment
Would be great to get this merged. I've written loads of other CodeDom tests (aiming for 100% code coverage woo!) that depend on this PR |
@hughbe new changes LGTM, you will need to disable/fixup tests so that full framework also passes |
// Because CodeDomProvider.CreateProvider(string.Empty) throws an internal ConfigurationErrorsException, | ||
// rather than the publically exposed exception, we need to call BinaryFormatterHelpers.AssertExceptionDeserializationFails | ||
// through reflection. | ||
MethodInfo method = typeof(BinaryFormatterHelpers).GetMethod(nameof(BinaryFormatterHelpers.AssertExceptionDeserializationFails)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add new overload to BinaryFormatterHelpers which takes Type to avoid reflection? (current one can call it since it's doing typeof(T)
anyway)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We’d have to do the same reflection jazz in that method in BinaryFormatter. I actually don’t think it would be really that useful. Mainly because this is the only case IIRC where we catch and validate an internal exception thrown from public API
Thanks @hughbe! |
* Add CodeDom.CodeValidator tests and fix some bugs * Fix netfx tests * PR feedback Commit migrated from dotnet/corefx@50e8db3
No description provided.