summaryrefslogtreecommitdiff
path: root/src/testsuite.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-21 20:56:16 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-21 20:56:16 +0000
commitc16cda5d715241bb4bff8050bee942a8a34a72c0 (patch)
tree145095fad6904382ecf6775dedc5c981d406a61a /src/testsuite.cpp
parent5e3bfa266bd99ac15fd621c6e14d12787ba22f6e (diff)
match() is no longer a function+no header, now a static method of InspIRCd class, blah blah blah. Also rip out the 1.2 matcher, as it was slow, and replace it with one adapted from znc, which happens to be a tiny bit faster than 1.1's (and the fastest I've seen so far that works properly)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10212 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/testsuite.cpp')
-rw-r--r--src/testsuite.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/testsuite.cpp b/src/testsuite.cpp
index 9ab30ff2d..5d957e984 100644
--- a/src/testsuite.cpp
+++ b/src/testsuite.cpp
@@ -16,7 +16,6 @@
#include "inspircd.h"
#include "testsuite.h"
#include "threadengine.h"
-#include "wildcard.h"
#include <iostream>
using namespace std;
@@ -98,14 +97,14 @@ TestSuite::TestSuite(InspIRCd* Instance) : ServerInstance(Instance)
}
/* Test that x matches y with match() */
-#define WCTEST(x, y) cout << "match(\"" << x << "\",\"" << y "\") " << ((passed = (match(x, y))) ? " SUCCESS!\n" : " FAILURE\n")
+#define WCTEST(x, y) cout << "match(\"" << x << "\",\"" << y "\") " << ((passed = (InspIRCd::Match(x, y, NULL))) ? " SUCCESS!\n" : " FAILURE\n")
/* Test that x does not match y with match() */
-#define WCTESTNOT(x, y) cout << "!match(\"" << x << "\",\"" << y "\") " << ((passed = ((!match(x, y)))) ? " SUCCESS!\n" : " FAILURE\n")
+#define WCTESTNOT(x, y) cout << "!match(\"" << x << "\",\"" << y "\") " << ((passed = ((!InspIRCd::Match(x, y, NULL)))) ? " SUCCESS!\n" : " FAILURE\n")
/* Test that x matches y with match() and cidr enabled */
-#define CIDRTEST(x, y) cout << "match(\"" << x << "\",\"" << y "\", true) " << ((passed = (match(x, y, true))) ? " SUCCESS!\n" : " FAILURE\n")
+#define CIDRTEST(x, y) cout << "match(\"" << x << "\",\"" << y "\", true) " << ((passed = (InspIRCd::MatchCIDR(x, y, NULL))) ? " SUCCESS!\n" : " FAILURE\n")
/* Test that x does not match y with match() and cidr enabled */
-#define CIDRTESTNOT(x, y) cout << "!match(\"" << x << "\",\"" << y "\", true) " << ((passed = ((!match(x, y, true)))) ? " SUCCESS!\n" : " FAILURE\n")
+#define CIDRTESTNOT(x, y) cout << "!match(\"" << x << "\",\"" << y "\", true) " << ((passed = ((!InspIRCd::MatchCIDR(x, y, NULL)))) ? " SUCCESS!\n" : " FAILURE\n")
bool TestSuite::DoWildTests()
{