mirror of
https://github.com/fatedier/frp.git
synced 2026-04-09 10:39:16 +08:00
add persistent proxy/visitor store with CRUD API and web UI (#5188)
This commit is contained in:
@@ -41,3 +41,16 @@ func TestParseRangeNumbers(t *testing.T) {
|
||||
_, err = ParseRangeNumbers("3-a")
|
||||
require.Error(err)
|
||||
}
|
||||
|
||||
func TestClonePtr(t *testing.T) {
|
||||
require := require.New(t)
|
||||
|
||||
var nilInt *int
|
||||
require.Nil(ClonePtr(nilInt))
|
||||
|
||||
v := 42
|
||||
cloned := ClonePtr(&v)
|
||||
require.NotNil(cloned)
|
||||
require.Equal(v, *cloned)
|
||||
require.NotSame(&v, cloned)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user