Add infrastructure to split tests that use unsafe from other tests.
Improve testing of package assert with unsafe.Pointer values.
Changes
Isolate tests that use the "unsafe" package in a separate package ./assert/internal/unsafetests. That way the assert package is not tainted with unsafe.
Remove one reference to the private assert.isNil() in assert tests.
Add more tests of assert.Nil and assert.NotNil with unsafe.Pointer.
Motivation
assert/assertions_test.go is tainted with unsafe just because of a single test added in #1319.
Summary
unsafe
from other tests.assert
withunsafe.Pointer
values.Changes
./assert/internal/unsafetests
. That way the assert package is not tainted with unsafe.assert.isNil()
in assert tests.assert.Nil
andassert.NotNil
withunsafe.Pointer
.Motivation
assert/assertions_test.go
is tainted withunsafe
just because of a single test added in #1319.