Open SoroushBeigi opened 3 months ago
Pointers & errors chapter tests do not cover the whole codebase, because this function is not tested:
func (b Bitcoin) String() string { return fmt.Sprintf("%d BTC", b) }
which can be covered with the test below:
t.Run("Bitcoin String", func(t *testing.T) { btc := Bitcoin(10) got := btc.String() want := "10 BTC" if got != want { t.Errorf("got %s want %s", got, want) } })
I strongly believe that we should encourage learners to find why the test coverage is not 100% and fix it as an assignment first.
@quii should I go for it?
Sure, but do a quick draft first so I can help you
@quii I created this PR with basic practice exercise added. feel free to tell me any possible improvements
Pointers & errors chapter tests do not cover the whole codebase, because this function is not tested:
which can be covered with the test below:
I strongly believe that we should encourage learners to find why the test coverage is not 100% and fix it as an assignment first.