summaryrefslogtreecommitdiff
path: root/Tests/Complex
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-07-14 09:44:49 -0400
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-07-14 09:44:49 -0400
commit1b95674b0ec096410163a324ef05a375d91f2261 (patch)
tree52d4fe963309fd2011f9c82e09757c4696f7b721 /Tests/Complex
parent308db351cc51397e22e50ab42898358556f1fece (diff)
downloadcmake-1b95674b0ec096410163a324ef05a375d91f2261.tar.gz
ENH: Do 4 files
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/Executable/complex.cxx40
1 files changed, 28 insertions, 12 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 6b88e85ec7..7d0cb56217 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -186,9 +186,11 @@ void TestCMGeneratedFileSTream()
std::string file1 = std::string(BINARY_DIR) + std::string("/generatedFile1");
std::string file2 = std::string(BINARY_DIR) + std::string("/generatedFile2");
std::string file3 = std::string(BINARY_DIR) + std::string("/generatedFile3");
+ std::string file4 = std::string(BINARY_DIR) + std::string("/generatedFile4");
std::string file1tmp = file1 + ".tmp";
std::string file2tmp = file2 + ".tmp";
std::string file3tmp = file3 + ".tmp";
+ std::string file4tmp = file4 + ".tmp";
gm.Open(file1.c_str());
gm << "This is generated file 1";
gm.Close();
@@ -198,32 +200,46 @@ void TestCMGeneratedFileSTream()
gm.Open(file3.c_str());
gm << "This is generated file 3";
gm.Close();
+ gm.Open(file4.c_str());
+ gm << "This is generated file 4";
+ gm.Close();
if ( cmSystemTools::FileExists(file1.c_str()) )
{
if ( cmSystemTools::FileExists(file2.c_str()) )
{
if ( cmSystemTools::FileExists(file3.c_str()) )
{
- if ( cmSystemTools::FileExists(file1tmp.c_str()) )
- {
- cmFailed("Something wrong with cmGeneratedFileStream. Temporary file is still here: ", file1tmp.c_str());
- }
- else if ( cmSystemTools::FileExists(file2tmp.c_str()) )
- {
- cmFailed("Something wrong with cmGeneratedFileStream. Temporary file is still here: ", file2tmp.c_str());
- }
- else if ( cmSystemTools::FileExists(file3tmp.c_str()) )
+ if ( cmSystemTools::FileExists(file4.c_str()) )
{
- cmFailed("Something wrong with cmGeneratedFileStream. Temporary file is still here: ", file3tmp.c_str());
+ if ( cmSystemTools::FileExists(file1tmp.c_str()) )
+ {
+ cmFailed("Something wrong with cmGeneratedFileStream. Temporary file is still here: ", file1tmp.c_str());
+ }
+ else if ( cmSystemTools::FileExists(file2tmp.c_str()) )
+ {
+ cmFailed("Something wrong with cmGeneratedFileStream. Temporary file is still here: ", file2tmp.c_str());
+ }
+ else if ( cmSystemTools::FileExists(file3tmp.c_str()) )
+ {
+ cmFailed("Something wrong with cmGeneratedFileStream. Temporary file is still here: ", file3tmp.c_str());
+ }
+ else if ( cmSystemTools::FileExists(file4tmp.c_str()) )
+ {
+ cmFailed("Something wrong with cmGeneratedFileStream. Temporary file is still here: ", file4tmp.c_str());
+ }
+ else
+ {
+ cmPassed("cmGeneratedFileStream works.");
+ }
}
else
{
- cmPassed("cmGeneratedFileStream works.");
+ cmFailed("Something wrong with cmGeneratedFileStream. Cannot find file: ", file4.c_str());
}
}
else
{
- cmFailed("Something wrong with cmGeneratedFileStream. Cannot find file: ", file3.c_str());
+ cmFailed("Something wrong with cmGeneratedFileStream. Found file: ", file3.c_str());
}
}
else