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

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

Issue 29680720: Issue 6221 - Add native tests. (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created Jan. 26, 2018, 8:49 p.m.
Right Patch Set: Review comments addressed Created Jan. 29, 2018, 4:56 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« test/compiled/RegExp.cpp ('K') | « test/compiled/StringMap.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
1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
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/>.
16 */
1 17
2 #include "gtest/gtest.h" 18 #include "gtest/gtest.h"
sergei 2018/01/26 22:13:36 Could you please remove the empty lines and add th
hub 2018/01/27 03:33:38 Done.
3
4 #include "compiled/String.h" 19 #include "compiled/String.h"
5
6 TEST(TestRegexp, RegExp)
sergei 2018/01/26 22:13:36 I would prefer to have it in a separate file.
hub 2018/01/27 03:33:37 Done.
7 {
8 auto id = GenerateRegExp(u"[0-9]*"_str, false);
9 EXPECT_EQ(id, 0);
10 EXPECT_FALSE(TestRegExp(id, u"abcd"_str));
11 EXPECT_TRUE(TestRegExp(id, u"1234"_str));
12 }
13 20
14 int main(int argc, char **argv) 21 int main(int argc, char **argv)
15 { 22 {
16 ::testing::InitGoogleTest(&argc, argv); 23 ::testing::InitGoogleTest(&argc, argv);
17 return RUN_ALL_TESTS(); 24 return RUN_ALL_TESTS();
18 } 25 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld