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
package circle | |
import ( | |
"testing" | |
) | |
func TestArea(t *testing.T) { | |
circle := Circle{Radius: 10} | |
expected := 314.1592653589793 |
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
package circle | |
import ( | |
"testing" | |
) | |
func TestDiameter(t *testing.T) { | |
circle := Circle{Radius: 7} | |
expected := 14.0 |
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
function initialName(name, length) { | |
const parts = name.split(' '); | |
return parts.filter((it, i) => i <= (length - 1)).map(it => it.substring(0, 1)).join(''); | |
}, |
OlderNewer