func TestIsValidIDType(t *testing.T) {
	t.Parallel()

	tests := []struct {
		name    string
		id      interface{}
		isValid bool
	}{
		{"int", int(1), true},
		{"int8", int8(1), true},
		{"int16", int16(1), true},
		{"int32", int32(1), true},
		{"int64", int64(1), true},
		{"uint", uint(1), true},
		{"uint8", uint8(1), true},
		{"uint16", uint16(1), true},
		{"uint32", uint32(1), true},
		{"uint64", uint64(1), true},
		{"string", "1", true},
		{"nil", nil, true},
		{"float32", float32(1), true},
		{"float64", float64(1), true},
		{"bool", true, false},
		{"chan int", make(chan int), false},
		{"complex64", complex64(1), false},
		{"complex128", complex128(1), false},
		{"func", func() {}, false},
	}

	t.Logf("Running %d tests", len(tests))
	for i, test := range tests {
		if btcjson.IsValidIDType(test.id) != test.isValid {
			t.Errorf("Test #%d (%s) valid mismatch - got %v, "+
				"want %v", i, test.name, !test.isValid,
				test.isValid)
			continue
		}
	}
}
// TestIsValidIDType ensures the IsValidIDType function behaves as expected.
TestIsValidIDType ensures the IsValidIDType function behaves as expected.
// TestIsValidIDType ensures the IsValidIDType function behaves as expected .
func TestIsValidIDType(t *testing.T) {
	t.Parallel()
	tests := []struct {
		name    string
		id      interface{}
		isValid bool
	}{
		{"int", int(1), true},
		{"int8", int8(1), true},
		{"int16", int16(1), true},
		{"int32", int32(1), true},
		{"int64", int64(1), true},
		{"uint", uint(1), true},
		{"uint8", uint8(1), true},
		{"uint16", uint16(1), true},
		{"uint32", uint32(1), true},
		{"uint64", uint64(1), true},
		{"string", "1", true},
		{"nil", nil, true},
		{"float32", float32(1), true},
		{"float64", float64(1), true},
		{"bool", true, false},
		{"chan int", make(chan int), false},
		{"complex64", complex64(1), false},
		{"complex128", complex128(1), false},
		{"func", func() {}, false},
	}
	t.Logf("Running %d tests", len(tests))
	for i, test := range tests {
		if btcjson.IsValidIDType(test.id) != test.isValid {
			t.Errorf("Test #%d (%s) valid mismatch - got %v, "+
				"want %v", i, test.name, !test.isValid,
				test.isValid)
			continue
		}
	}
}
func TestIsValidIDType ( t * testing . T ) { t . Parallel ( ) tests := [ ] struct { name string id interface { } isValid bool } { { " " , int ( 1 ) , true } , { " " , int8 ( 1 ) , true } , { " " , int16 ( 1 ) , true } , { " " , int32 ( 1 ) , true } , { " " , int64 ( 1 ) , true } , { " " , uint ( 1 ) , true } , { " " , uint8 ( 1 ) , true } , { " " , uint16 ( 1 ) , true } , { " " , uint32 ( 1 ) , true } , { " " , uint64 ( 1 ) , true } , { " " , " " , true } , { " " , nil , true } , { " " , float32 ( 1 ) , true } , { " " , float64 ( 1 ) , true } , { " " , true , false } , { " " , make ( chan int ) , false } , { " " , complex64 ( 1 ) , false } , { " " , complex128 ( 1 ) , false } , { " " , func ( ) { } , false } , } t . Logf ( " " , len ( tests ) ) for i , test := range tests { if btcjson . IsValidIDType ( test . id ) != test . isValid { t . Errorf ( " " + " " , i , test . name , ! test . isValid , test . isValid ) continue } } }
TestIsValidIDType ensures the IsValidIDType function behaves as expected.
TestIsValidIDType ensures the IsValidIDType function behaves as expected .