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

src/goTest: Add command Test Function At Cursor or Test Previous #1509

Closed
wants to merge 2 commits into from

Conversation

mislav
Copy link
Contributor

@mislav mislav commented May 18, 2021

This runs Test Function At Cursor if a unit test is found at the
cursor, otherwise it turns Test Previous.

Fixes #1508

@google-cla
Copy link

google-cla bot commented May 18, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no Used by googlebot to label PRs as having an invalid CLA. The text of this label should not change. label May 18, 2021
@mislav
Copy link
Contributor Author

mislav commented May 18, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. and removed cla: no Used by googlebot to label PRs as having an invalid CLA. The text of this label should not change. labels May 18, 2021
@gopherbot
Copy link
Collaborator

This PR (HEAD: c97b2eb) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/320769 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Go Bot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://golang.org/doc/contribute.html#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 1: Run-TryBot+1

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 1:

Kokoro presubmit build starting for golang/vscode-go/gcp_ubuntu/presubmit
Logs at:
https://source.cloud.google.com/results/invocations/28bedfb6-9e18-47d4-a375-b5341c64ee2b


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 1: TryBot-Result-1

Kokoro presubmit build finished with status: FAILURE
Logs at: https://source.cloud.google.com/results/invocations/28bedfb6-9e18-47d4-a375-b5341c64ee2b


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

This PR (HEAD: 0e3f90f) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/320769 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Mislav Marohnić:

Patch Set 2:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Mislav Marohnić:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 2: Run-TryBot+1

(5 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 2:

Kokoro presubmit build starting for golang/vscode-go/gcp_ubuntu/presubmit
Logs at:
https://source.cloud.google.com/results/invocations/268215b1-3e0a-40d3-8900-ab2ca0dc91b0


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 2: TryBot-Result-1

Kokoro presubmit build finished with status: FAILURE
Logs at: https://source.cloud.google.com/results/invocations/268215b1-3e0a-40d3-8900-ab2ca0dc91b0


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

This runs `Test Function At Cursor` if a unit test is found at the
cursor, otherwise it turns `Test Previous`.
@gopherbot
Copy link
Collaborator

This PR (HEAD: 0054155) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/320769 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Mislav Marohnić:

Patch Set 2:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 3: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 3:

Kokoro presubmit build starting for golang/vscode-go/gcp_ubuntu/presubmit
Logs at:
https://source.cloud.google.com/results/invocations/83386db7-94a9-40ab-879a-b68b4d7aea66


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 3: TryBot-Result+1

Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/83386db7-94a9-40ab-879a-b68b4d7aea66


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@hyangah hyangah added this to the v0.26.0 milestone May 27, 2021
@hyangah hyangah changed the title Add a command to run the test at cursor or re-run previous test src/goTest: Add command Test Function At Cursor or Test Previous May 27, 2021
@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 3: Code-Review+2 Trust+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Mislav Marohnić:

Patch Set 4:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Michael Knyszek:

Patch Set 4: Trust+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/320769.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request May 27, 2021
This runs `Test Function At Cursor` if a unit test is found at the
cursor, otherwise it turns `Test Previous`.

Fixes #1508

Change-Id: I91305797dfeccd79c1f5ea14298a60803f24492b
GitHub-Last-Rev: 0054155
GitHub-Pull-Request: #1509
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320769
Trust: Michael Knyszek <mknyszek@google.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@gopherbot
Copy link
Collaborator

This PR is being closed because golang.org/cl/320769 has been merged.

@gopherbot gopherbot closed this May 27, 2021
@hyangah
Copy link
Contributor

hyangah commented Jun 15, 2021

We will soon release this in v0.26.0.
@mislav It would be great if you can take a look and test that your change is still working correctly.
https://github.com/golang/vscode-go/releases/tag/v0.26.0-rc.1
Thanks.

gopherbot pushed a commit that referenced this pull request Sep 22, 2021
In the case of cursorOrPrevious command not finding a Go test under the
cursor, it will call go.test.previous. However, cursorOrPrevious
automatically saves when there was a test found, but previous does not.
This can lead to the user being surprised as to why doesn't
cursorOrPrevious always save.

Followup to #1509

Change-Id: Ia5b625b4819727555fb20a1fb022200a2e4abd4e
GitHub-Last-Rev: 1ec414f
GitHub-Pull-Request: #1751
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/347789
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command to run unit test under cursor or re-run previous test
3 participants