Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated pull request from Repo Assist.
Summary
Adds
GenerativeInheritanceTests.fs— 5 focused tests verifying that one generativeProvidedTypeDefinitioncan inherit from another, with virtual-method overrides dispatched correctly at runtime.What's tested
Dog is subclass of AnimalIsSubclassOfholds in the loaded assemblyAnimal.Speak is abstractAbstract|Virtualattributes on no-invokeCode method in abstract classDog.Speak returns expected string_namefield;Speak()reads it and formats the resultCat.Speak returns expected stringPolymorphic dispatch via Animal refMethodInfoexercises virtual dispatchRoot cause / motivation
DefineMethodOverrideis exercised byBasicGenerativeProvisionTests(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
Closes no issue — this is a proactive testing improvement (Tasks 3 & 9).