pig-latin: Remove call to Printf
in tests and use sub-tests
#2230
Labels
good first issue
x:action/improve
Improve existing functionality/content
x:knowledge/none
No existing Exercism knowledge required
x:module/practice-exercise
Work on Practice Exercises
x:size/small
Small amount of work
x:type/content
Work on content (e.g. exercises, concepts)
While testing solutions locally for the exercises in the track, I noticed that the exercise pig-latin has a direct call to
fmt.Printf
:go/exercises/practice/pig-latin/pig_latin_test.go
Line 13 in d631baf
This makes it so just running
go test
produces output, which is not desirable. I understand this call to print was probably an attempt to explicitly print which tests failed and which ones passed, but thego
command itself can print the result of individual tests in verbose mode withgo test -v
- the tests themselves shouldn't print if they passed or failed.While removing this call to print, we can make this exercise use sub-tests, as discussed in #2098
The tasks here are:
fmt.Printf
on the testsPASS:
andFAIL:
from strings -go test -v
can provide this kind of output based just on the test (or sub-test) resultsThe text was updated successfully, but these errors were encountered: