mirror of
https://gitee.com/willfree/mlsr.git
synced 2026-06-03 15:56:13 +08:00
测试路由表缓存条目
This commit is contained in:
@@ -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) {
|
||||
|
||||
}
|
||||
@@ -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())
|
||||
}
|
||||
Reference in New Issue
Block a user