-
Notifications
You must be signed in to change notification settings - Fork 2
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
#19 Add equality #32
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Added more unit tests as requested. 👍🏻 |
This PR
.Equals()
method for.GetHashCode()
method as adviced by the compiler for