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

Delta Between Two Patch Sets: test/compiled/StringMap.cpp

Issue 29613616: Issue 6064 - Put C++ code into a configurable namespace (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Left Patch Set: rebase Created Dec. 12, 2017, 12:45 p.m.
Right Patch Set: rebase Created Feb. 6, 2018, 9:54 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« compiled/StringMap.h ('K') | « test/compiled/String.cpp ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #include <string> 18 #include <string>
19 #include "gtest/gtest.h" 19 #include "gtest/gtest.h"
20 #include "compiled/StringMap.h" 20 #include "compiled/StringMap.h"
21
22 ABP_NS_USING
21 23
22 template<template <typename T> class S> 24 template<template <typename T> class S>
23 void testStringMap() 25 void testStringMap()
24 { 26 {
25 S<std::string> map; 27 S<std::string> map;
26 auto key = u"Foobar"_str; 28 auto key = u"Foobar"_str;
27 EXPECT_EQ(key.length(), 6); 29 EXPECT_EQ(key.length(), 6);
28 EXPECT_EQ(map.size(), 0); 30 EXPECT_EQ(map.size(), 0);
29 31
30 map[u"Foobar"_str] = "one"; 32 map[u"Foobar"_str] = "one";
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 75
74 TEST(TestStringMap, stringMap) 76 TEST(TestStringMap, stringMap)
75 { 77 {
76 testStringMap<StringMap>(); 78 testStringMap<StringMap>();
77 } 79 }
78 80
79 TEST(TestStringMap, ownedStringMap) 81 TEST(TestStringMap, ownedStringMap)
80 { 82 {
81 testStringMap<OwnedStringMap>(); 83 testStringMap<OwnedStringMap>();
82 } 84 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld