aboutsummaryrefslogtreecommitdiffstats
path: root/executor/test_test.go
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@gmail.com>2017-05-17 01:56:40 +0200
committerGitHub <noreply@github.com>2017-05-17 01:56:40 +0200
commit64cd235dcf60d3ab0dec3d4b0f168297782417a7 (patch)
tree67c41279da959d253aab080b873284e6e2e5186a /executor/test_test.go
parentffb66e506d9083140196d9b4b2a46e15bc4a5d1e (diff)
parentac0c70f74a5badbebec721c2be0602ea98c0437b (diff)
Merge pull request #169 from xairy/executor-csum
prog, executor: move checksum computation to executor
Diffstat (limited to 'executor/test_test.go')
-rw-r--r--executor/test_test.go24
1 files changed, 15 insertions, 9 deletions
diff --git a/executor/test_test.go b/executor/test_test.go
index f197dbf51..368454ac3 100644
--- a/executor/test_test.go
+++ b/executor/test_test.go
@@ -5,8 +5,8 @@ package executor
import "testing"
-func TestCopyin(t *testing.T) {
- switch res := testCopyin(); {
+func testWrapper(t *testing.T, f func() int) {
+ switch res := f(); {
case res < 0:
t.Skip()
case res > 0:
@@ -15,12 +15,18 @@ func TestCopyin(t *testing.T) {
}
}
+func TestCopyin(t *testing.T) {
+ testWrapper(t, testCopyin)
+}
+
+func TestCsumInet(t *testing.T) {
+ testWrapper(t, testCsumInet)
+}
+
+func TestCsumInetAcc(t *testing.T) {
+ testWrapper(t, testCsumInetAcc)
+}
+
func TestKVM(t *testing.T) {
- switch res := testKVM(); {
- case res < 0:
- t.Skip()
- case res > 0:
- t.Fail()
- default:
- }
+ testWrapper(t, testKVM)
}