summaryrefslogtreecommitdiff
path: root/tests/test-Regex.cc
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-12-04 01:19:09 -0800
committerPixel <pixel@nobis-crew.org>2011-12-04 01:20:10 -0800
commitd440c3f50a918a932293ad98bcec96eaa4683222 (patch)
tree33e8e42a8e4506ae9da70cdb44dd133bde7f7219 /tests/test-Regex.cc
parente5577eb7a643ce7885e5d14660a6d24254161622 (diff)
Reworked some things in the architecture, mainly exceptions and asserts.
-) Removed Assert() -) Added AAssert(), IAssert(), RAssert(), TAssert() and Failure() -) Reworked all asserts in the code, and added meaningful messages to them. -) Changed the way the startup code is generated; BALAU_STARTUP is no longer necessary.
Diffstat (limited to 'tests/test-Regex.cc')
-rw-r--r--tests/test-Regex.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test-Regex.cc b/tests/test-Regex.cc
index b656445..082afd2 100644
--- a/tests/test-Regex.cc
+++ b/tests/test-Regex.cc
@@ -1,8 +1,6 @@
#include <Main.h>
#include <BRegex.h>
-BALAU_STARTUP;
-
using namespace Balau;
void MainTask::Do() {
@@ -11,11 +9,11 @@ void MainTask::Do() {
Regex reg("http://([^/ ]+)/([^? ]+)(\\?([^ ]+))?");
Regex::Captures c = reg.match("some url: http://www.test.com/uri?var1=val1 that should match");
- Assert(c[0] == "http://www.test.com/uri?var1=val1");
- Assert(c[1] == "www.test.com");
- Assert(c[2] == "uri");
- Assert(c[3] == "?var1=val1");
- Assert(c[4] == "var1=val1");
+ TAssert(c[0] == "http://www.test.com/uri?var1=val1");
+ TAssert(c[1] == "www.test.com");
+ TAssert(c[2] == "uri");
+ TAssert(c[3] == "?var1=val1");
+ TAssert(c[4] == "var1=val1");
Printer::log(M_STATUS, "Test::Regex passed");
}