diff options
Diffstat (limited to 'src/pkg/big/arith_test.go')
-rw-r--r-- | src/pkg/big/arith_test.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/pkg/big/arith_test.go b/src/pkg/big/arith_test.go index f3e2d4735..b6c56c39e 100644 --- a/src/pkg/big/arith_test.go +++ b/src/pkg/big/arith_test.go @@ -6,7 +6,6 @@ package big import "testing" - type funWW func(x, y, c Word) (z1, z0 Word) type argWW struct { x, y, c, z1, z0 Word @@ -26,7 +25,6 @@ var sumWW = []argWW{ {_M, _M, 1, 1, _M}, } - func testFunWW(t *testing.T, msg string, f funWW, a argWW) { z1, z0 := f(a.x, a.y, a.c) if z1 != a.z1 || z0 != a.z0 { @@ -34,7 +32,6 @@ func testFunWW(t *testing.T, msg string, f funWW, a argWW) { } } - func TestFunWW(t *testing.T) { for _, a := range sumWW { arg := a @@ -51,7 +48,6 @@ func TestFunWW(t *testing.T) { } } - type funVV func(z, x, y []Word) (c Word) type argVV struct { z, x, y nat @@ -70,7 +66,6 @@ var sumVV = []argVV{ {nat{0, 0, 0, 0}, nat{_M, 0, _M, 0}, nat{1, _M, 0, _M}, 1}, } - func testFunVV(t *testing.T, msg string, f funVV, a argVV) { z := make(nat, len(a.z)) c := f(z, a.x, a.y) @@ -85,7 +80,6 @@ func testFunVV(t *testing.T, msg string, f funVV, a argVV) { } } - func TestFunVV(t *testing.T) { for _, a := range sumVV { arg := a @@ -106,7 +100,6 @@ func TestFunVV(t *testing.T) { } } - type funVW func(z, x []Word, y Word) (c Word) type argVW struct { z, x nat @@ -169,7 +162,6 @@ var rshVW = []argVW{ {nat{_M, _M, _M >> 20}, nat{_M, _M, _M}, 20, _M << (_W - 20) & _M}, } - func testFunVW(t *testing.T, msg string, f funVW, a argVW) { z := make(nat, len(a.z)) c := f(z, a.x, a.y) @@ -184,14 +176,12 @@ func testFunVW(t *testing.T, msg string, f funVW, a argVW) { } } - func makeFunVW(f func(z, x []Word, s uint) (c Word)) funVW { return func(z, x []Word, s Word) (c Word) { return f(z, x, uint(s)) } } - func TestFunVW(t *testing.T) { for _, a := range sumVW { arg := a @@ -220,7 +210,6 @@ func TestFunVW(t *testing.T) { } } - type funVWW func(z, x []Word, y, r Word) (c Word) type argVWW struct { z, x nat @@ -254,7 +243,6 @@ var prodVWW = []argVWW{ {nat{_M<<7&_M + 1<<6, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, 1 << 6, _M >> (_W - 7)}, } - func testFunVWW(t *testing.T, msg string, f funVWW, a argVWW) { z := make(nat, len(a.z)) c := f(z, a.x, a.y, a.r) @@ -269,7 +257,6 @@ func testFunVWW(t *testing.T, msg string, f funVWW, a argVWW) { } } - // TODO(gri) mulAddVWW and divWVW are symmetric operations but // their signature is not symmetric. Try to unify. @@ -296,7 +283,6 @@ func testFunWVW(t *testing.T, msg string, f funWVW, a argWVW) { } } - func TestFunVWW(t *testing.T) { for _, a := range prodVWW { arg := a @@ -311,7 +297,6 @@ func TestFunVWW(t *testing.T) { } } - var mulWWTests = []struct { x, y Word q, r Word @@ -320,7 +305,6 @@ var mulWWTests = []struct { // 32 bit only: {0xc47dfa8c, 50911, 0x98a4, 0x998587f4}, } - func TestMulWW(t *testing.T) { for i, test := range mulWWTests { q, r := mulWW_g(test.x, test.y) @@ -330,7 +314,6 @@ func TestMulWW(t *testing.T) { } } - var mulAddWWWTests = []struct { x, y, c Word q, r Word @@ -342,7 +325,6 @@ var mulAddWWWTests = []struct { {_M, _M, _M, _M, 0}, } - func TestMulAddWWW(t *testing.T) { for i, test := range mulAddWWWTests { q, r := mulAddWWW_g(test.x, test.y, test.c) |