I'm learning Go right now and found, that it has a similar concept.
funcTestSum(t*testing.T){t.Run("collection of 5 elements",func(t*testing.T){numbers:=[]int{1,2,3,4,5}got:=Sum(numbers)want:=15ifwant!=got{t.Errorf("got '%d' want '%d', %v",got,want,numbers)}})t.Run("collection of any size",func(t*testing.T){numbers:=[]int{1,2,3,4,5,6,7,8}got:=Sum(numbers)want:=36ifwant!=got{t.Errorf("got '%d' want '%d', %v",got,want,numbers)}})}
I like it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm learning Go right now and found, that it has a similar concept.
I like it.