Conversation
tenntenn
reviewed
Sep 18, 2019
| func main() { | ||
| err := run() | ||
| if err != nil { | ||
| os.Exit(ExitCodeErr) |
tenntenn
reviewed
Sep 18, 2019
| keepfile = ".gitkeep" | ||
| ) | ||
|
|
||
| func SetupTest(t *testing.T, path string, isDir bool) func() { |
Member
There was a problem hiding this comment.
一時ディレクトリを作って、コピーしてあとで全部消した方が楽そう
tenntenn
reviewed
Sep 18, 2019
| case true: | ||
| err := os.Mkdir(path, os.ModePerm) | ||
| if err != nil { | ||
| t.Errorf("Setup Error : %v", err) |
Member
There was a problem hiding this comment.
エラーが報告されたとしてもどうしようもないからt.Fatalfの方がよさそう
tenntenn
reviewed
Sep 18, 2019
| if err != nil { | ||
| t.Errorf("Setup Error : %v", err) | ||
| } | ||
| defer f.Close() |
tenntenn
reviewed
Sep 18, 2019
|
|
||
| img := image.NewRGBA(image.Rect(0, 0, 100, 100)) | ||
| if err := jpeg.Encode(f, img, &jpeg.Options{Quality: 100}); err != nil { | ||
| t.Errorf("Setup Error : %v", err) |
tenntenn
reviewed
Sep 18, 2019
| } | ||
| } | ||
|
|
||
| func TestConvert(t *testing.T) { |
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.
課題2
【TRY】io.Readerとio.Writer
kadai2/nas/doc/homework.md に記載
1回目の宿題のテストを作ってみて下さい
coverage: 89.1% of statements