2 * Copyright (C) 2005 Casper S. Hornstrup
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include "backend/mingw/mingw.h"
26 #define RBUILD_BASE "tools" SSEP "rbuild" SSEP
34 virtual void Run () = 0;
36 void Assert ( const char *message
,
38 void IsNull ( void* reference
,
41 void IsNotNull ( void* reference
,
44 void IsTrue ( bool condition
,
47 void IsFalse ( bool condition
,
50 void AreEqual ( int expected
,
54 void AreEqual ( const std::string
& expected
,
55 const std::string
& actual
,
58 void AreNotEqual ( int expected
,
66 #define IS_NULL(reference) IsNull((void*)reference,__FILE__,__LINE__)
67 #define IS_NOT_NULL(reference) IsNotNull((void*)reference,__FILE__,__LINE__)
68 #define IS_TRUE(condition) IsTrue(condition,__FILE__,__LINE__)
69 #define IS_FALSE(condition) IsFalse(condition,__FILE__,__LINE__)
70 #define ARE_EQUAL(expected,actual) AreEqual(expected,actual,__FILE__,__LINE__)
71 #define ARE_NOT_EQUAL(expected,actual) AreNotEqual(expected,actual,__FILE__,__LINE__)
73 class ProjectTest
: public BaseTest
80 class ModuleTest
: public BaseTest
87 class DefineTest
: public BaseTest
94 class IncludeTest
: public BaseTest
101 class InvokeTest
: public BaseTest
108 class LinkerFlagTest
: public BaseTest
115 class IfTest
: public BaseTest
120 void TestProjectIf ( Project
& project
);
121 void TestModuleIf ( Project
& project
);
125 class FunctionTest
: public BaseTest
132 class SourceFileTest
: public BaseTest
137 void FullParseTest ();
139 bool IsParentOf ( const SourceFile
* parent
,
140 const SourceFile
* child
);
145 class CDFileTest
: public BaseTest
152 class SymbolTest
: public BaseTest
158 class CompilationUnitTest
: public BaseTest
164 #endif /* __TEST_H */