Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/compiled/StringMap.cpp

Issue 29692574: Issue 6280 - Check that we don't return invalid entries (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Feb. 9, 2018, 2 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/compiled/StringMap.cpp
===================================================================
--- a/test/compiled/StringMap.cpp
+++ b/test/compiled/StringMap.cpp
@@ -20,22 +20,27 @@
#include "compiled/StringMap.h"
ABP_NS_USING
template<template <typename T> class S>
void testStringMap()
{
S<std::string> map;
+
+ EXPECT_EQ(map.begin(), map.end());
+
auto key = u"Foobar"_str;
EXPECT_EQ(key.length(), 6);
EXPECT_EQ(map.size(), 0);
+ EXPECT_EQ(map.begin(), map.end());
sergei 2018/02/12 08:50:05 It seems this line is redundant because `map` is n
hub 2018/02/12 14:20:25 Done.
map[u"Foobar"_str] = "one";
EXPECT_EQ(map.size(), 1);
+ EXPECT_NE(map.begin(), map.end());
sergei 2018/02/12 08:50:05 That's all right. In addition it would be good to
sergei 2018/02/12 08:54:28 I missed the comment in the issue description, see
map[u""_str] = "null";
EXPECT_EQ(map.size(), 2);
auto entry = map.find(u"Foobar"_str);
EXPECT_TRUE(entry);
entry = map.find(u"Foobar2"_str);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld