测试路由表缓存条目

This commit is contained in:
free will committed 2022-06-24 21:49:51 +08:00
1 parent 645e5936ef
commit 96c60a5cae
2 files changed
+60

No files matched your search

+15
View File
@@ -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) {
}
+45
View File
@@ -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())
}