github.com/gogf/gf/v2@v2.7.4/util/gconv/gconv_z_unit_test.go (about)

     1  // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
     2  //
     3  // This Source Code Form is subject to the terms of the MIT License.
     4  // If a copy of the MIT was not distributed with this file,
     5  // You can obtain one at https://github.com/gogf/gf.
     6  
     7  package gconv_test
     8  
     9  import (
    10  	"testing"
    11  
    12  	"github.com/gogf/gf/v2/test/gtest"
    13  	"github.com/gogf/gf/v2/util/gconv"
    14  )
    15  
    16  type impUnmarshalValue struct{}
    17  
    18  func (*impUnmarshalValue) UnmarshalValue(interface{}) error {
    19  	return nil
    20  }
    21  
    22  func TestIUnmarshalValue(t *testing.T) {
    23  	gtest.C(t, func(t *gtest.T) {
    24  		var v any = &impUnmarshalValue{}
    25  		_, ok := (v).(gconv.IUnmarshalValue)
    26  		t.AssertEQ(ok, true)
    27  	})
    28  }