don't pass vector<pointer> by value unless you are looking for trouble, also fixed Assert() to take stdargs to make it's usage simpler and less error-prone. Also fixed IsTrue(), etc, to take file and line info by args and created macros to pass that info automatically.
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/test.h
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/test.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/test.h	2005-01-04 01:51:16 UTC (rev 12774)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/test.h	2005-01-04 03:10:07 UTC (rev 12775)
@@ -11,17 +11,29 @@
 	virtual ~BaseTest();
 	virtual void Run() = 0;
 protected:
-	void Assert(char *message);
-	void IsTrue(bool condition);
-	void IsFalse(bool condition);
+	void Assert(const char *message, ...);
+	void IsTrue(bool condition,
+	            const char* file,
+	            int line );
+	void IsFalse(bool condition,
+	             const char* file,
+	             int line );
 	void AreEqual(int expected,
-	              int actual);
+	              int actual,
+	              const char* file,
+	              int line );
 	void AreNotEqual(int expected,
-	                 int actual);
+	                 int actual,
+	                 const char* file,
+	                 int line );
 private:
 	void Fail();
 };
 
+#define IS_TRUE(condition) IsTrue(condition,__FILE__,__LINE__)
+#define IS_FALSE(condition) IsFalse(condition,__FILE__,__LINE__)
+#define ARE_EQUAL(expected,actual) AreEqual(expected,actual,__FILE__,__LINE__)
+#define ARE_NOT_EQUAL(expected,actual) AreNotEqual(expected,actual,__FILE__,__LINE__)
 
 class ModuleTest : public BaseTest
 {

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp	2005-01-04 01:51:16 UTC (rev 12774)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp	2005-01-04 03:10:07 UTC (rev 12775)
@@ -1,3 +1,4 @@
+#include <stdarg.h>
 #include "rbuild.h"
 #include "test.h"
 
@@ -10,69 +11,68 @@
 {
 }
 
-void BaseTest::Assert(char *message)
+void BaseTest::Assert(const char *message, ...)
 {
-	printf(message);
+	va_list args;
+	va_start ( args, message );
+	vprintf(message, args);
+	va_end ( args );
 	Fail();
 }
 
-void BaseTest::IsTrue(bool condition)
+void BaseTest::IsTrue(bool condition,
+                      const char* file,
+                      int line)
 {
 	if (!condition)
 	{
-		char message[100];
-		sprintf(message,
-		        "Condition was not true at %s:%d",
-		        __FILE__,
-		        __LINE__);
-		Assert(message);
+		Assert("Condition was not true at %s:%d\n",
+		       file,
+		       line);
 	}
 }
 
-void BaseTest::IsFalse(bool condition)
+void BaseTest::IsFalse(bool condition,
+                       const char* file,
+                       int line)
 {
 	if (condition)
 	{
-		char message[100];
-		sprintf(message,
-		        "Condition was not false at %s:%d",
-		        __FILE__,
-		        __LINE__);
-		Assert(message);
+		Assert("Condition was not false at %s:%d\n",
+		       file,
+		       line);
 	}
 }
 
 void BaseTest::AreEqual(int expected,
-                        int actual)
+                        int actual,
+                        const char* file,
+                        int line)
 {
 	if (actual != expected)
 	{
-		char message[100];
-		sprintf(message,
-		        "Expected %d/0x%.08x was %d/0x%.08x at %s:%d",
-		        expected,
-		        expected,
-		        actual,
-		        actual,
-		        __FILE__,
-		        __LINE__);
-		Assert(message);
+		Assert("Expected %d/0x%.08x was %d/0x%.08x at %s:%d\n",
+		       expected,
+		       expected,
+		       actual,
+		       actual,
+		       file,
+		       line);
 	}
 }
 
 void BaseTest::AreNotEqual(int expected,
-                           int actual)
+                           int actual,
+                           const char* file,
+                           int line)
 {
 	if (actual == expected)
 	{
-		char message[100];
-		sprintf(message,
-		        "Actual value expected to be different from %d/0x%.08x at %s:%d",
-		        expected,
-		        expected,
-		        __FILE__,
-		        __LINE__);
-		Assert(message);
+		Assert("Actual value expected to be different from %d/0x%.08x at %s:%d\n",
+		       expected,
+		       expected,
+		       file,
+		       line);
 	}
 }
 
@@ -99,11 +99,12 @@
 	void Run()
 	{
 		int numberOfFailedTests = 0;
-		BaseTestList tests = GetTests();
+		BaseTestList tests;
+		GetTests(tests);
 		for (size_t i = 0; i < tests.size(); i++)
 		{
 			BaseTest& test = *tests[i];
-			/*test.Run();*/
+			test.Run();
 			if (test.Failed)
 				numberOfFailedTests++;
 		}
@@ -116,11 +117,9 @@
 	}
 
 private:
-	BaseTestList GetTests()
+	void GetTests ( BaseTestList& tests )
 	{
-		BaseTestList tests;
 		tests.push_back(new ModuleTest());
-		return tests;
 	}
 };
 
@@ -128,7 +127,7 @@
 int main(int argc,
          char** argv)
 {
-	TestDispatcher testDispatcher = TestDispatcher();
+	TestDispatcher testDispatcher;
 	testDispatcher.Run();
 	return 0;
 };

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp	2005-01-04 01:51:16 UTC (rev 12774)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp	2005-01-04 03:10:07 UTC (rev 12775)
@@ -2,5 +2,5 @@
 
 void ModuleTest::Run()
 {
-	IsTrue(false);
+	IS_TRUE(false);
 }