package main
import "testing"
func Test_sum(t *testing.T) {
tt := []struct {
args GetArgs
sum int
}{
{Args {2, 4}, 6},
{Args {2, -2}, 0},
}
for _, tc := range tt {
tci := tc.args.(GetArgs)
s := Sum(tci)
if s != tc.sum {
t.Errorf("sum of %v and %v should be %v, received- %v", tc.args.GetA(), tc.args.GetB(), tc.sum, s)
}
}
}