diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-03-24 19:38:27 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-03-24 19:38:27 +0900 |
commit | 8fb175eb2c3079613a7970e85d1648207c9d829b (patch) | |
tree | abb0646208b9d4598a60aab0f04878599e9978c0 /table/table_test.go | |
parent | 8d7b670b4ff6cab9e7065ed869b94e42446ecb93 (diff) |
policy: add prefix filter
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/table_test.go')
-rw-r--r-- | table/table_test.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/table/table_test.go b/table/table_test.go index 4a7a3a23..81e377f6 100644 --- a/table/table_test.go +++ b/table/table_test.go @@ -42,13 +42,13 @@ func TestTableDeleteDestByNlri(t *testing.T) { pathT := TableCreatePath(msgT) ipv4t := NewIPv4Table(0) for _, path := range pathT { - tableKey := ipv4t.tableKey(path.getNlri()) - dest := ipv4t.createDest(path.getNlri()) + tableKey := ipv4t.tableKey(path.GetNlri()) + dest := ipv4t.createDest(path.GetNlri()) ipv4t.setDestination(tableKey, dest) } - tableKey := ipv4t.tableKey(pathT[0].getNlri()) + tableKey := ipv4t.tableKey(pathT[0].GetNlri()) gdest := ipv4t.getDestination(tableKey) - rdest := deleteDestByNlri(ipv4t, pathT[0].getNlri()) + rdest := deleteDestByNlri(ipv4t, pathT[0].GetNlri()) assert.Equal(t, rdest, gdest) } @@ -58,12 +58,12 @@ func TestTableDeleteDest(t *testing.T) { pathT := TableCreatePath(msgT) ipv4t := NewIPv4Table(0) for _, path := range pathT { - tableKey := ipv4t.tableKey(path.getNlri()) - dest := ipv4t.createDest(path.getNlri()) + tableKey := ipv4t.tableKey(path.GetNlri()) + dest := ipv4t.createDest(path.GetNlri()) ipv4t.setDestination(tableKey, dest) } - tableKey := ipv4t.tableKey(pathT[0].getNlri()) - dest := ipv4t.createDest(pathT[0].getNlri()) + tableKey := ipv4t.tableKey(pathT[0].GetNlri()) + dest := ipv4t.createDest(pathT[0].GetNlri()) ipv4t.setDestination(tableKey, dest) deleteDest(ipv4t, dest) gdest := ipv4t.getDestination(tableKey) @@ -83,8 +83,8 @@ func TestTableSetDestinations(t *testing.T) { ipv4t := NewIPv4Table(0) destinations := make(map[string]Destination) for _, path := range pathT { - tableKey := ipv4t.tableKey(path.getNlri()) - dest := ipv4t.createDest(path.getNlri()) + tableKey := ipv4t.tableKey(path.GetNlri()) + dest := ipv4t.createDest(path.GetNlri()) destinations[tableKey] = dest } ipv4t.setDestinations(destinations) @@ -98,8 +98,8 @@ func TestTableGetDestinations(t *testing.T) { ipv4t := NewIPv4Table(0) destinations := make(map[string]Destination) for _, path := range pathT { - tableKey := ipv4t.tableKey(path.getNlri()) - dest := ipv4t.createDest(path.getNlri()) + tableKey := ipv4t.tableKey(path.GetNlri()) + dest := ipv4t.createDest(path.GetNlri()) destinations[tableKey] = dest } ipv4t.setDestinations(destinations) |