Skip to content

[Repo Assist] tests: add GenerativeCustomAttributeTests; prepare release 8.7.0#506

Merged
dsyme merged 2 commits intomasterfrom
repo-assist/tests-generative-custom-attrs-20260419-144662b46aedd811
Apr 20, 2026
Merged

[Repo Assist] tests: add GenerativeCustomAttributeTests; prepare release 8.7.0#506
dsyme merged 2 commits intomasterfrom
repo-assist/tests-generative-custom-attrs-20260419-144662b46aedd811

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist.

Summary

Adds GenerativeCustomAttributeTests.fs — 5 regression tests for custom attribute encoding in the generative IL writer. These cover attribute targets and argument types not previously exercised by the existing tests in BasicGenerativeProvisionTests.fs (which only tested attributes on properties).

Also updates RELEASE_NOTES.md with a new 8.7.0 entry covering this and the previously-merged GenerativeMethodsTests (#505).

New tests

Test What it verifies
Custom attribute on a generative type round-trips correctly ObsoleteAttribute(string, bool) placed on the type definition itself
Custom attribute with bool constructor argument round-trips correctly bool values survive the ECMA-335 encode/decode path
Custom attribute with enum constructor argument round-trips correctly DebuggerBrowsableAttribute(DebuggerBrowsableState.Never) — enum arg decoded as underlying int
Multiple custom attributes on a single generative method are all preserved defineCustomAttrs writes all attributes, not just the first
Custom attribute on a generative method has correct string argument DescriptionAttribute(string) on an instance method

Root cause / motivation

Several custom-attribute encoding bugs were fixed in earlier PRs (#432, #490, #501). This PR adds focused regression tests for the remaining un-covered paths:

  • attributes on types (not just members)
  • attributes on methods (not just properties)
  • bool and enum constructor argument encoding
  • multiple attributes on a single member

Test Status

Passed! - Failed: 0, Passed: 147, Skipped: 0, Total: 147, Duration: 7 s

All 147 tests pass (142 pre-existing + 5 new).

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

…tom attr encoding); prepare release 8.7.0

Adds GenerativeCustomAttributeTests.fs with 5 focused tests covering
custom attribute encoding in the generative IL writer for attribute
targets and argument types not previously exercised:

- ObsoleteAttribute(string, bool) on the generated TYPE ITSELF
- DescriptionAttribute(string) on an instance METHOD
- Multiple attributes on the same method (all-attrs preserved path)
- DebuggerBrowsableAttribute(DebuggerBrowsableState) on a property
  (enum argument round-trip via underlying int)
- Scalar bool argument round-trip

Also updates RELEASE_NOTES.md with 8.7.0 entry covering this and
the previously-merged GenerativeMethodsTests (#505).

All 147 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review April 20, 2026 03:01
@dsyme dsyme merged commit 8e38b56 into master Apr 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant