-
Notifications
You must be signed in to change notification settings - Fork 1k
Adding Data, DataObject, FileDrop and Text tests to ClipboardCoreTests #13645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Adding Data, DataObject, FileDrop and Text tests to ClipboardCoreTests #13645
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13645 +/- ##
===================================================
+ Coverage 76.60828% 76.69074% +0.08246%
===================================================
Files 3253 3255 +2
Lines 640996 641599 +603
Branches 47439 47490 +51
===================================================
+ Hits 491056 492047 +991
+ Misses 146290 145888 -402
- Partials 3650 3664 +14
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR expands ClipboardCoreTests
by adding comprehensive tests for various SetData
scenarios, including custom formats, object data, file drops, image/bitmap/metafile handling, and multiple text formats. It also updates the test project to reference drawing and GDI+ libraries and includes bitmap assets for testing.
- Introduces
TheoryData
and parameterized tests for custom data formats and exception types - Adds tests for
SetDataObject
overloads, file drop lists, images, metafiles, and text formats - Updates
.csproj
to referenceSystem.Drawing.Common
and GDI+ and to include bitmap fixtures
Reviewed Changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
ClipboardCoreTests.cs | Added new tests covering custom formats, objects, file drops, images, metafiles, and text formats |
System.Private.Windows.Core.Tests.csproj | Added references for drawing/GDI+ libraries and included bitmap content |
Comments suppressed due to low confidence (1)
src/System.Private.Windows.Core/tests/System.Private.Windows.Core.Tests/System/Private/Windows/Ole/ClipboardCoreTests.cs:505
- The
StringCollection
is being initialized with a C# 12 array literal, which produces astring[]
, not aStringCollection
. Use a collection initializer or add items vianew StringCollection { "filePath", "filePath2" }
.
StringCollection filePaths =
...ore/tests/System.Private.Windows.Core.Tests/System/Private/Windows/Ole/ClipboardCoreTests.cs
Outdated
Show resolved
Hide resolved
@JeremyKuhne Please help review this PR. Currently all SimpleTests have been added to ClipboardCoreTests. Do the remaining cases need to be moved here? |
Related #13331
Proposed changes
Microsoft Reviewers: Open in CodeFlow