Open
Conversation
This package is a drop-in replacement for a lot of the custom (duplicated) functions that perform basic slice operations via iteration. Signed-off-by: Joe Groocock <jgroocock@cloudflare.com>
purpleidea
reviewed
Feb 9, 2024
| } | ||
| for _, v1 := range g.VerticesSorted() { | ||
| vs := []Vertex{} | ||
| var vs VertexSlice |
Owner
There was a problem hiding this comment.
Please leave these alone for now. Explicitly seeing the list is more logical at least for me.
| v1 := NV("v1") | ||
| v2 := NV("v2") | ||
| v3 := NV("v3") | ||
| if VertexContains(v1, []Vertex{v1, v2, v3}) != true { |
Owner
There was a problem hiding this comment.
You can leave all the tests in, let's just test the new methods you're using!
Contributor
Author
There was a problem hiding this comment.
Is there much point in testing stdlib functionality? The point of this change was to reduce the amount of code we're carrying. Less code -> easier to understand/reason about
Owner
|
Let's it at least prove it does the same thing at least once.
…On Fri, Feb 9, 2024, 11:13 Joe Groocock ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pgraph/pgraph_test.go
<#738 (comment)>:
> @@ -323,34 +323,6 @@ func TestDeleteVertex2(t *testing.T) {
}
}
-func TestVertexContains1(t *testing.T) {
- v1 := NV("v1")
- v2 := NV("v2")
- v3 := NV("v3")
- if VertexContains(v1, []Vertex{v1, v2, v3}) != true {
Is there much point in testing stdlib functionality? The point of this
change was to reduce the amount of code we're carrying. Less code -> easier
to understand/reason about
—
Reply to this email directly, view it on GitHub
<#738 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABA7MYUN65TYJJF6VZM67TYSXZEDAVCNFSM6AAAAABDBER2Z2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNZSGA2TAMBUGA?target=https://github.com>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
b8072b2 to
380004b
Compare
37fdda9 to
5f4ae05
Compare
3221a93 to
4ad2b9a
Compare
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 package is a drop-in replacement for a lot of the custom (duplicated) functions that perform basic slice operations via iteration.