-
Notifications
You must be signed in to change notification settings - Fork 7
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
Added ComMatrix method; Changed private func to public #17
Conversation
types/types.go
Outdated
@@ -160,3 +160,36 @@ func (m ComMatrix) Contains(cd ComDetails) bool { | |||
|
|||
return false | |||
} | |||
|
|||
// Returns True if both ComMatrixes have exactly the same ComMatrix details. | |||
func (m ComMatrix) Equals(other ComMatrix) bool { |
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.
why not to use the Diff function?
u need from diff to be equal to nothing from 2 sides
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.
@sabinaaledort also can use that on the test of the origin
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.
Because we don't need the Diff matrices is this case, it occupies unnecessary space.
I'm not sure the right thing to do is to keep the equals func in the commatrix repo instead of just use in the test. |
I think using addFromFile func for the test is an interesting idea but I think you should consider to compare the csv files directly, it's an an extra dependence that might cause bugs. For example if we have a bug in the addFromFile func and we miss a port the test will fail... |
This PR changed functions in order to use them in a new openshift\origin test specified here :
Changed "addFromFile" function (in types.go) to a public function to allow using it in the mentioned above test.