Take the line number as an integer, the STRINGIZER macro didn't work as expected
[reactos.git] / rostests / rosautotest / precomp.h
index 87fdf2d..f5e65ad 100644 (file)
@@ -1,81 +1,62 @@
-/* Includes */
-#include <stdio.h>
+/* General includes */
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <vector>
 
+using namespace std;
+
+#define WIN32_NO_STATUS
 #include <windows.h>
+#include <ndk/rtlfuncs.h>
 #include <reason.h>
+#include <shlobj.h>
 #include <wininet.h>
 
+#include <ndk/rtlfuncs.h>
 #include <reactos/buildno.h>
 
-/* Defines */
-#define BUFFER_BLOCKSIZE  2048
-#define BUILDNO_LENGTH    10
-#define PLATFORM_LENGTH   25
-#define SERVER_HOSTNAME   L"localhost"
-#define SERVER_FILE       L"testman/webservice/"
-
-/* Enums */
-typedef enum _TESTTYPES
-{
-    WineTest
-}
-TESTTYPES;
-
-/* Structs */
-typedef struct _APP_OPTIONS
-{
-    BOOL Shutdown;
-    BOOL Submit;
-    PWSTR Module;
-    PCHAR Test;
-}
-APP_OPTIONS, *PAPP_OPTIONS;
-
-typedef struct _WINE_GETSUITEID_DATA
-{
-    PCHAR Module;
-    PCHAR Test;
-}
-WINE_GETSUITEID_DATA, *PWINE_GETSUITEID_DATA;
-
-typedef struct _GENERAL_SUBMIT_DATA
-{
-    PCHAR TestID;
-    PCHAR SuiteID;
-}
-GENERAL_SUBMIT_DATA, *PGENERAL_SUBMIT_DATA;
-
-typedef struct _WINE_SUBMIT_DATA
-{
-    GENERAL_SUBMIT_DATA General;
-    PCHAR Log;
-}
-WINE_SUBMIT_DATA, *PWINE_SUBMIT_DATA;
-
-typedef struct _GENERAL_FINISH_DATA
-{
-    PCHAR TestID;
-}
-GENERAL_FINISH_DATA, *PGENERAL_FINISH_DATA;
+/* Class includes */
+#include "auto_array_ptr.h"
+#include "CConfiguration.h"
+#include "CFatalException.h"
+#include "CInvalidParameterException.h"
+#include "CProcess.h"
+#include "CSimpleException.h"
+#include "CTestInfo.h"
+#include "CTest.h"
+#include "CTestList.h"
+#include "CJournaledTestList.h"
+#include "CVirtualTestList.h"
+#include "CWebService.h"
+#include "CWineTest.h"
+
+/* Useful macros */
+#define EXCEPTION(Message)   throw CSimpleException(Message)
+#define FATAL(Message)       throw CFatalException(__FILE__, __LINE__, Message)
+#define SSEXCEPTION          throw CSimpleException(ss.str().c_str())
 
 /* main.c */
-extern APP_OPTIONS AppOptions;
-extern HANDLE hProcessHeap;
-extern PCHAR AuthenticationRequestString;
-extern PCHAR SystemInfoRequestString;
+extern CConfiguration Configuration;
 
 /* shutdown.c */
-BOOL ShutdownSystem();
+bool ShutdownSystem();
 
 /* tools.c */
-VOID EscapeString(PCHAR Output, PCHAR Input);
-VOID StringOut(PCHAR String);
-
-/* webservice.c */
-PCHAR GetTestID(TESTTYPES TestType);
-PCHAR GetSuiteID(TESTTYPES TestType, const PVOID TestData);
-BOOL Submit(TESTTYPES TestType, const PVOID TestData);
-BOOL Finish(TESTTYPES TestType, const PVOID TestData);
-
-/* winetests.c */
-BOOL RunWineTests();
+wstring AsciiToUnicode(const char* AsciiString);
+wstring AsciiToUnicode(const string& AsciiString);
+string EscapeString(const char* Input);
+string EscapeString(const string& Input);
+string GetINIValue(PCWCH AppName, PCWCH KeyName, PCWCH FileName);
+bool IsNumber(const char* Input);
+void StringOut(const string& String);
+string UnicodeToAscii(PCWSTR UnicodeString);
+string UnicodeToAscii(const wstring& UnicodeString);
+
+
+/* Lazy HACK to allow compiling/debugging with MSVC while we lack support
+   for linking against "debugsup_ntdll" in MSVC */
+#ifdef _MSC_VER
+    #define DbgPrint
+#endif