package zone

import (
	"fmt"
	"git.loafle.net/overflow/overflow_probe/discovery/discovery/types"
	"git.loafle.net/overflow/overflow_probe/discovery/util/converter"
	"testing"
)

func TestZoneScan(t *testing.T) {
	zoneCallback := func(z *types.DiscoveryZone) {
		//fmt.Println(z.MinIp_)
		//fmt.Println(z.MaxIp_)
		//fmt.Println(z.LocalIp_)
		//fmt.Println(z.Cidr)
		fmt.Println(z)
		fmt.Println(z.CidrStr())
	}

	Scan(zoneCallback)
}

func TestNewZone(t *testing.T) {
	zone := NewZone()
	fmt.Println(zone)
	fmt.Println(zone.CidrInt64())
	fmt.Println(converter.Int64ToCidr(zone.CidrInt64()))
	fmt.Println(zone.Iface)
}
