Supplement test case, www.google.com should match /google.com/
This commit is contained in:
parent
4b1d61a600
commit
dc60b4c9a2
|
@ -33,6 +33,10 @@ func Test_Suffix_Tree(t *testing.T) {
|
|||
So(found, ShouldEqual, true)
|
||||
So(v, ShouldEqual, "8.8.8.8")
|
||||
|
||||
v, found = root.search(strings.Split("www.google.com", "."))
|
||||
So(found, ShouldEqual, true)
|
||||
So(v, ShouldEqual, "8.8.8.8")
|
||||
|
||||
v, found = root.search(strings.Split("scholar.google.com", "."))
|
||||
So(found, ShouldEqual, true)
|
||||
So(v, ShouldEqual, "208.67.222.222")
|
||||
|
|
Loading…
Reference in New Issue