Browse Source

Supplement test case, www.google.com should match /google.com/

master
kenshinx 4 years ago
parent
commit
dc60b4c9a2
  1. 4
      sfx_tree_test.go

4
sfx_tree_test.go

@ -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…
Cancel
Save