add test_case

This commit is contained in:
2020-02-09 23:59:45 +08:00
parent d60039deac
commit 8ead1d6020
2 changed files with 29 additions and 0 deletions

15
test_case/some_test.go Normal file
View File

@@ -0,0 +1,15 @@
package main
import (
"testing"
)
func TestAdd(t *testing.T) {
a := int32(11)
b := int32(22)
expect := int32(33)
result := Add(a, b)
if expect != result {
t.Errorf("Error, expect: %d, actual: %d", expect, result)
}
}