#include "flutter/fml/ascii_trie.h"
#include "gtest/gtest.h"
Go to the source code of this file.
|
| TEST (AsciiTableTest, Simple) |
|
| TEST (AsciiTableTest, ExactMatch) |
|
| TEST (AsciiTableTest, Empty) |
|
| TEST (AsciiTableTest, MultipleEntries) |
|
◆ TEST() [1/4]
TEST |
( |
AsciiTableTest |
, |
|
|
Empty |
|
|
) |
| |
Definition at line 26 of file ascii_trie_unittests.cc.
26 {
28 ASSERT_TRUE(trie.
Query(
"foo"));
29}
A trie for looking for ASCII prefixes.
bool Query(const char *argument)
Returns true if argument is prefixed by the contents of the trie.
◆ TEST() [2/4]
TEST |
( |
AsciiTableTest |
, |
|
|
ExactMatch |
|
|
) |
| |
Definition at line 19 of file ascii_trie_unittests.cc.
19 {
21 auto entries = std::vector<std::string>{"foo"};
23 ASSERT_TRUE(trie.
Query(
"foo"));
24}
void Fill(const std::vector< std::string > &entries)
Clear and insert all the entries into the trie.
◆ TEST() [3/4]
TEST |
( |
AsciiTableTest |
, |
|
|
MultipleEntries |
|
|
) |
| |
Definition at line 31 of file ascii_trie_unittests.cc.
31 {
33 auto entries = std::vector<std::string>{"foo", "bar"};
35 ASSERT_TRUE(trie.
Query(
"foozzz"));
36 ASSERT_TRUE(trie.
Query(
"barzzz"));
37}
◆ TEST() [4/4]
TEST |
( |
AsciiTableTest |
, |
|
|
Simple |
|
|
) |
| |
Definition at line 11 of file ascii_trie_unittests.cc.
11 {
13 auto entries = std::vector<std::string>{"foo"};
15 ASSERT_TRUE(trie.
Query(
"foobar"));
16 ASSERT_FALSE(trie.
Query(
"google"));
17}