Skip to content
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

Added additional tests for generic attributes. #106745

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

koenigst
Copy link
Contributor

  • Added a test for GetCustomAttribute to verify that the values of the generic type are correctly initialized.
  • Added some theory data to check the equality of generic attributes.

Fixes #73735

- Added a test for GetCustomAttribute to verify that the values of the generic type are correctly initialized.
- Added some theory data to check the equality of generic attributes.

Fixes dotnet#73735
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Aug 21, 2024
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/56887", TestRuntimes.Mono)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks #56887 is resolved, could you please remove all the [ActiveIssue("https://github.com/dotnet/runtime/issues/56887", TestRuntimes.Mono)]?

Copy link
Contributor

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good thanks @koenigst, lets see if anything fails after removing [ActiveIssue("https://github.com/dotnet/runtime/issues/56887", TestRuntimes.Mono)] in the tests

@koenigst
Copy link
Contributor Author

@buyaa-n It looks like System.Tests.AttributeGetCustomAttributes.GetCustomAttributesOnOpenGenericBaseTypeRetrievesDerivedAttributes is still failing on Mono. I will put the active issue attribute back on this test method.

@buyaa-n
Copy link
Contributor

buyaa-n commented Aug 28, 2024

@buyaa-n It looks like System.Tests.AttributeGetCustomAttributes.GetCustomAttributesOnOpenGenericBaseTypeRetrievesDerivedAttributes is still failing on Mono. I will put the active issue attribute back on this test method.

Yep, I filed a new issue for that and updated the attribute, thanks!

Copy link
Contributor

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @koenigst!

@buyaa-n buyaa-n merged commit 92d0ed4 into dotnet:main Aug 29, 2024
82 of 84 checks passed
@koenigst koenigst deleted the 73735-generic-attribute-tests branch August 30, 2024 04:39
jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
* Added additional tests for generic attributes.
- Added a test for GetCustomAttribute to verify that the values of the generic type are correctly initialized.
- Added some theory data to check the equality of generic attributes.

Fixes dotnet#73735

* Removed active issue attribute for solved issue 56887.

* Added active issue attribute for solved issue dotnet#56887 because the test is still failing on Mono.

* Update src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Attributes.cs

---------

Co-authored-by: Stefan König <stefan.koenig@zuehlke.com>
Co-authored-by: Buyaa Namnan <buyankhishig.namnan@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Reflection community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generic attributes lack testing
2 participants