Skip to content

[Repo Assist] tests: add GenerativeInheritanceTests; prepare release 8.8.0#507

Merged
dsyme merged 2 commits intomasterfrom
repo-assist/tests-generative-inheritance-20260421-7db5ab0f544566a4
Apr 21, 2026
Merged

[Repo Assist] tests: add GenerativeInheritanceTests; prepare release 8.8.0#507
dsyme merged 2 commits intomasterfrom
repo-assist/tests-generative-inheritance-20260421-7db5ab0f544566a4

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist.

Summary

Adds GenerativeInheritanceTests.fs — 5 focused tests verifying that one generative ProvidedTypeDefinition can inherit from another, with virtual-method overrides dispatched correctly at runtime.

What's tested

Test What it checks
Dog is subclass of Animal IsSubclassOf holds in the loaded assembly
Animal.Speak is abstract Auto-applied Abstract|Virtual attributes on no-invokeCode method in abstract class
Dog.Speak returns expected string Constructor sets _name field; Speak() reads it and formats the result
Cat.Speak returns expected string Same for Cat
Polymorphic dispatch via Animal ref Invoking via the base-class MethodInfo exercises virtual dispatch

Root cause / motivation

DefineMethodOverride is exercised by BasicGenerativeProvisionTests (for interfaces) but there was no dedicated test for provided-type-to-provided-type inheritance with runtime invocation. The new file gives explicit, focused coverage of that code path.

Test status

Passed!  - Failed: 0, Passed: 152, Skipped: 0, Total: 152

Closes no issue — this is a proactive testing improvement (Tasks 3 & 9).

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

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@96b9d4c39aa22359c0b38265927eadb31dcf4e2a

Add 5 focused tests for generative type inheritance:
- Abstract base class (Animal) with abstract virtual Speak() method
- Two concrete derived classes (Dog, Cat) that override Speak()
- Parameterized constructors initializing instance fields
- Runtime invocation tests verifying correct string output
- Polymorphic dispatch test via base-class MethodInfo

152/152 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review April 21, 2026 10:18
@dsyme dsyme merged commit cab9948 into master Apr 21, 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