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

Unified Diff: test/compiled/abptest.cpp

Issue 29680720: Issue 6221 - Add native tests. (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Jan. 26, 2018, 8:49 p.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
« test/compiled/StringMap.cpp ('K') | « test/compiled/StringMap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/compiled/abptest.cpp
===================================================================
new file mode 100644
--- /dev/null
+++ b/test/compiled/abptest.cpp
@@ -0,0 +1,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.
+
+#include "compiled/String.h"
+
+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.
+{
+ auto id = GenerateRegExp(u"[0-9]*"_str, false);
+ EXPECT_EQ(id, 0);
+ EXPECT_FALSE(TestRegExp(id, u"abcd"_str));
+ EXPECT_TRUE(TestRegExp(id, u"1234"_str));
+}
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
« test/compiled/StringMap.cpp ('K') | « test/compiled/StringMap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld