-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/golang: add testcase handling for func with error returns
This commit improves the handling of test cases for functions that return an error as their last return value. - A boolean field called "wantErr" is added to the test case struct to indicate whether an error is expected. - The error return value is now handled before comparing other return values, ensuring correct error handling in test cases. For golang/vscode-go#1594 Change-Id: Ib48f6b85b2fdad96cb7fb563b8bdbf17d692f569 Reviewed-on: https://go-review.googlesource.com/c/tools/+/623997 Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
- Loading branch information
Showing
2 changed files
with
134 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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