Fix building rbuild tests
authorCasper Hornstrup <chorns@users.sourceforge.net>
Wed, 23 Nov 2005 15:16:18 +0000 (15:16 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Wed, 23 Nov 2005 15:16:18 +0000 (15:16 +0000)
svn path=/trunk/; revision=19487

12 files changed:
reactos/tools/rbuild/tests/cdfiletest.cpp
reactos/tools/rbuild/tests/compilationunittest.cpp
reactos/tools/rbuild/tests/data/compilationunit.xml
reactos/tools/rbuild/tests/definetest.cpp
reactos/tools/rbuild/tests/iftest.cpp
reactos/tools/rbuild/tests/includetest.cpp
reactos/tools/rbuild/tests/invoketest.cpp
reactos/tools/rbuild/tests/linkerflagtest.cpp
reactos/tools/rbuild/tests/moduletest.cpp
reactos/tools/rbuild/tests/projecttest.cpp
reactos/tools/rbuild/tests/sourcefiletest.cpp
reactos/tools/rbuild/tests/symboltest.cpp

index d41c8dc..764f4fc 100644 (file)
@@ -22,7 +22,8 @@ using std::string;
 void CDFileTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/cdfile.xml" );
-       Project project( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        ARE_EQUAL ( 3, project.cdfiles.size () );
 
        CDFile& cdfile1 = *project.cdfiles[0];
index e96f61f..519ab07 100644 (file)
@@ -22,7 +22,8 @@ using std::string;
 void CompilationUnitTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/compilationunit.xml" );
-       Project project ( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        ARE_EQUAL ( 1, project.modules.size () );
 
        Module& module1 = *project.modules[0];
index 92719cd..d238c38 100644 (file)
@@ -2,7 +2,7 @@
 <project name="Project" makefile="Makefile">
        <directory name="dir1">
                <module name="module1" type="buildtool">
-                       <compilationunit>
+                       <compilationunit name="module1_unit.c">
                                <file>file1.c</file>
                                <file>file2.c</file>
                        </compilationunit>
index 7dd8383..ca39765 100644 (file)
@@ -22,7 +22,8 @@ using std::string;
 void DefineTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/define.xml" );
-       Project project ( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        ARE_EQUAL(1, project.non_if_data.defines.size());
        Define& define1 = *project.non_if_data.defines[0];
        ARE_EQUAL("define1", define1.name);
index 3419e81..b71cd74 100644 (file)
@@ -60,7 +60,8 @@ void
 IfTest::Run ()
 {
        string projectFilename ( RBUILD_BASE "tests/data/if.xml" );
-       Project project ( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
 
        TestProjectIf ( project );
        TestModuleIf ( project );
index 5677a99..a9753c9 100644 (file)
@@ -22,7 +22,8 @@ using std::string;
 void IncludeTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/include.xml" );
-       Project project ( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        ARE_EQUAL(1, project.non_if_data.includes.size());
        Include& include1 = *project.non_if_data.includes[0];
        ARE_EQUAL("include1", include1.directory);
index 39651fa..5732525 100644 (file)
@@ -22,7 +22,8 @@ using std::string;
 void InvokeTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/invoke.xml" );
-       Project project ( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        ARE_EQUAL(1, project.modules.size());
 
        Module& module1 = *project.modules[0];
index 15a4ef1..1045e79 100644 (file)
@@ -22,7 +22,8 @@ using std::string;
 void LinkerFlagTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/linkerflag.xml" );
-       Project project ( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        ARE_EQUAL(1, project.linkerFlags.size());
        LinkerFlag& linkerFlag1 = *project.linkerFlags[0];
        ARE_EQUAL("-lgcc1", linkerFlag1.flag);
index 4def3ff..5967390 100644 (file)
@@ -22,7 +22,8 @@ using std::string;
 void ModuleTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/module.xml" );
-       Project project ( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        ARE_EQUAL(2, project.modules.size());
 
        Module& module1 = *project.modules[0];
index 0b49bd7..17050a4 100644 (file)
@@ -22,6 +22,7 @@ using std::string;
 void ProjectTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/project.xml" );
-       Project project( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        ARE_EQUAL(2, project.modules.size());
 }
index a7c3eab..bfe693b 100644 (file)
@@ -51,7 +51,9 @@ SourceFileTest::IsParentOf ( const SourceFile* parent,
 void
 SourceFileTest::IncludeTest ()
 {
-       const Project project ( RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency_include.xml" );
+       const string projectFilename = RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency_include.xml";
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        AutomaticDependency automaticDependency ( project );
        automaticDependency.ParseFiles ();
        ARE_EQUAL( 4, automaticDependency.sourcefile_map.size () );
@@ -64,7 +66,9 @@ SourceFileTest::IncludeTest ()
 void
 SourceFileTest::FullParseTest ()
 {
-       const Project project ( RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency.xml" );
+       const string projectFilename = RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency.xml";
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        AutomaticDependency automaticDependency ( project );
        automaticDependency.ParseFiles ();
        ARE_EQUAL( 5, automaticDependency.sourcefile_map.size () );
index 07209f9..ff8a037 100644 (file)
@@ -22,7 +22,8 @@ using std::string;
 void SymbolTest::Run()
 {
        string projectFilename ( RBUILD_BASE "tests/data/symbol.xml" );
-       Project project ( projectFilename );
+       Configuration configuration;
+       Project project ( configuration, projectFilename );
        
        ARE_EQUAL ( 1, project.modules.size () );
        Module& module1 = *project.modules[0];