mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 04:22:22 +00:00
15 lines
272 B
Go
15 lines
272 B
Go
// Copyright © 2017 ChaiShushan <chaishushan{AT}gmail.com>.
|
|
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
|
|
package sum
|
|
|
|
import "testing"
|
|
|
|
func TestSum(t *testing.T) {
|
|
result := Sum(1, 1)
|
|
|
|
if result != 2 {
|
|
t.Errorf("%d does not equal 2", result)
|
|
}
|
|
}
|