From f371f2f85b84d17797167288600bc63abf69654a Mon Sep 17 00:00:00 2001 From: Yuri Gorshenin Date: Wed, 27 Apr 2016 18:02:05 +0300 Subject: [PATCH] [base] Fixed MemTrie tests. --- base/base_tests/mem_trie_test.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/base/base_tests/mem_trie_test.cpp b/base/base_tests/mem_trie_test.cpp index 15e2ad75c2..de806d61e0 100644 --- a/base/base_tests/mem_trie_test.cpp +++ b/base/base_tests/mem_trie_test.cpp @@ -21,11 +21,12 @@ UNIT_TEST(MemTrie_Basic) for (auto const & p : data) trie.Add(p.first, p.second); - vector> ordered_data; - trie.ForEach([&ordered_data](string const & k, int v) + vector> trie_data; + trie.ForEach([&trie_data](string const & k, int v) { - ordered_data.emplace_back(k, v); + trie_data.emplace_back(k, v); }); sort(data.begin(), data.end()); - TEST_EQUAL(data, ordered_data, ()); + sort(trie_data.begin(), trie_data.end()); + TEST_EQUAL(data, trie_data, ()); }