diff --git a/route/NamePrefixTableEntry_test.go b/route/NamePrefixTableEntry_test.go new file mode 100644 index 0000000..06d5b07 --- /dev/null +++ b/route/NamePrefixTableEntry_test.go @@ -0,0 +1,15 @@ +// Package route +// @Author: Wang Feng +// @Description: +// @Version: 0.1.0 +// @Date: 2022/6/24 21:33 +// @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室 +// + +package route + +import "testing" + +func TestNamePrefixTable_AddEntry(t *testing.T) { + +} \ No newline at end of file diff --git a/route/RoutingTablePoolEntry_test.go b/route/RoutingTablePoolEntry_test.go new file mode 100644 index 0000000..ba66ff6 --- /dev/null +++ b/route/RoutingTablePoolEntry_test.go @@ -0,0 +1,45 @@ +// Package route +// @Author: Wang Feng +// @Description: +// @Version: 0.1.0 +// @Date: 2022/6/24 21:44 +// @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室 +// + +package route + +import ( + "fmt" + "minlib/component" + "testing" +) + +// +// TestRoutingTablePoolEntry_Init +// @Description: 测试初始化 +// @param t +// +func TestRoutingTablePoolEntry_Init(t *testing.T) { + iden, _ := component.CreateIdentifierByString("/ifIhaveAnotherChance") + rtpe := new(RoutingTablePoolEntry) + rtpe.Init(iden) + + // 打印 + fmt.Println(rtpe.m_useCount) + fmt.Println(rtpe.m_destination.ToUri()) +} + +// +// TestRoutingTablePoolEntry_InitDest +// @Description: 测试初始化 +// @param t +// +func TestRoutingTablePoolEntry_InitDest(t *testing.T) { + iden, _ := component.CreateIdentifierByString("/ifIhaveAnotherChance") + rtpe := new(RoutingTablePoolEntry) + rtpe.InitDest(iden, 123) + + // 打印 + fmt.Println(rtpe.m_useCount) + fmt.Println(rtpe.m_destination.ToUri()) +}