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

#19 Add equality #32

Merged
merged 5 commits into from
Aug 23, 2023
Merged

#19 Add equality #32

merged 5 commits into from
Aug 23, 2023

Conversation

omaus
Copy link
Collaborator

@omaus omaus commented Aug 22, 2023

This PR

@omaus omaus requested a review from kMutagene August 22, 2023 21:14
Copy link
Member

@kMutagene kMutagene left a comment

Choose a reason for hiding this comment

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

Thanks! I think we'll need some more tests to be sure, especially regarding the attribute collection. We should keep in mind that this replaces the test utility functions for cvparam equality used in ARCTokenization, bu i'll open a separate issue for that.

[<Fact>]
let ``Equals`` () =
let testCvp1 = CvParam("test", "test", "test", ParamValue.Value "test", Generic.Dictionary<string,IParam>() |> fun d -> d.Add("test", testCvParams.Head); d)
let testCvp2 = CvParam("test", "test", "test", ParamValue.Value "test", Generic.Dictionary<string,IParam>() |> fun d -> d.Add("test", testCvParams.Head); d)
Copy link
Member

@kMutagene kMutagene Aug 23, 2023

Choose a reason for hiding this comment

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

Can you add some tests for CvParams with attributes please? I am thinking of one where we expect them to be equal, and one where we expect them not to be equal

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, clarification: Attributes where the attributes themselves have attributes

@omaus omaus requested a review from kMutagene August 23, 2023 10:37
@omaus
Copy link
Collaborator Author

omaus commented Aug 23, 2023

Added more unit tests as requested. 👍🏻

@kMutagene kMutagene merged commit a482bf3 into main Aug 23, 2023
2 checks passed
@omaus omaus deleted the feature-equality-#19 branch August 23, 2023 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement equality for CvParam to compare with another CvParam (StructuralEquality)
2 participants