| Index: third_party/WebKit/LayoutTests/http/tests/inspector-unit/trie-expected.txt
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/trie-expected.txt b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/trie-expected.txt
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..da08fe0a1d717150e3928f35f1d4c1ed64c29fbd
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/trie-expected.txt
|
| @@ -0,0 +1,117 @@
|
| +Verify "trie" functionality.
|
| +
|
| +Test add:
|
| +
|
| +test: testAddWord
|
| +trie.add("hello")
|
| +trie.has("he") = false
|
| +trie.has("hello") = true
|
| +trie.has("helloo") = false
|
| +
|
| +test: testAddWords
|
| +trie.add("foo")
|
| +trie.add("bar")
|
| +trie.add("bazz")
|
| +trie.has("f") = false
|
| +trie.has("ba") = false
|
| +trie.has("baz") = false
|
| +trie.has("bar") = true
|
| +trie.has("bazz") = true
|
| +
|
| +test: testRemoveWord
|
| +trie.add("foo")
|
| +trie.remove("f") = false
|
| +trie.remove("fo") = false
|
| +trie.remove("fooo") = false
|
| +trie.has("foo") = true
|
| +trie.remove("foo") = true
|
| +trie.has("foo") = false
|
| +
|
| +test: testWordOverwrite
|
| +trie.add("foo")
|
| +trie.add("foo")
|
| +trie.remove("foo") = true
|
| +trie.has("foo") = false
|
| +
|
| +test: testRemoveNonExisting
|
| +trie.add("foo")
|
| +trie.remove("bar") = false
|
| +trie.remove("baz") = false
|
| +trie.has("foo") = true
|
| +
|
| +test: testEmptyWord
|
| +trie.add("")
|
| +trie.has("") = true
|
| +trie.remove("") = true
|
| +trie.has("") = false
|
| +
|
| +test: testAllWords
|
| +trie.add("foo")
|
| +trie.add("bar")
|
| +trie.add("bazzz")
|
| +trie.words() = [
|
| + foo,
|
| + bar,
|
| + bazzz
|
| +]
|
| +trie.words("f") = [
|
| + foo
|
| +]
|
| +trie.words("g") = []
|
| +trie.words("b") = [
|
| + bar,
|
| + bazzz
|
| +]
|
| +trie.words("ba") = [
|
| + bar,
|
| + bazzz
|
| +]
|
| +trie.words("bar") = [
|
| + bar
|
| +]
|
| +trie.words("barz") = []
|
| +trie.words("baz") = [
|
| + bazzz
|
| +]
|
| +
|
| +test: testOneCharWords
|
| +trie.add("a")
|
| +trie.add("b")
|
| +trie.add("c")
|
| +trie.words() = [
|
| + a,
|
| + b,
|
| + c
|
| +]
|
| +
|
| +test: testChainWords
|
| +trie.add("f")
|
| +trie.add("fo")
|
| +trie.add("foo")
|
| +trie.add("foo")
|
| +trie.words() = [
|
| + f,
|
| + fo,
|
| + foo
|
| +]
|
| +
|
| +test: testClearTrie
|
| +trie.add("foo")
|
| +trie.add("bar")
|
| +trie.words() = [
|
| + foo,
|
| + bar
|
| +]
|
| +trie.clear()
|
| +trie.words() = []
|
| +
|
| +test: testLongestPrefix
|
| +trie.add("fo")
|
| +trie.add("food")
|
| +trie.longestPrefix("fear", false) = "f"
|
| +trie.longestPrefix("fear", true) = ""
|
| +trie.longestPrefix("football", false) = "foo"
|
| +trie.longestPrefix("football", true) = "fo"
|
| +trie.longestPrefix("bar", false) = ""
|
| +trie.longestPrefix("bar", true) = ""
|
| +
|
|
|