Files
nomad/helper/pointer/pointer_test.go
Seth Hoenig 109f25feb5 helpers: provide a few generic helper functions
This PR deprecates some functions in favor of generic alternatives.

The new functions are compatible only with Nomad v1.4+.

The old functions (nor their use) should not be removed until Nomad v1.6+.
2022-06-09 10:43:54 -05:00

19 lines
205 B
Go

package pointer
import (
"testing"
"github.com/shoenig/test/must"
)
func Test_Of(t *testing.T) {
s := "hello"
sPtr := Of(s)
must.Eq(t, s, *sPtr)
b := "bye"
sPtr = &b
must.NotEq(t, s, *sPtr)
}