diff options
author | Brad King <brad.king@kitware.com> | 2015-09-02 14:23:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-02 14:23:17 (GMT) |
commit | c5cc3441b379e2bc6e70efd6dbd530edebbf0024 (patch) | |
tree | de0c2a39648c936039b7c86886cbe49c04b92923 /Source/kwsys/testCommandLineArguments1.cxx | |
parent | 72c11e590273d100c49f472afc3a7569b233ff00 (diff) | |
parent | 1b79433a6d7cdd1da1a0af74240f2299c78e4112 (diff) | |
download | CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.zip CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.tar.gz CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/testCommandLineArguments1.cxx')
-rw-r--r-- | Source/kwsys/testCommandLineArguments1.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Source/kwsys/testCommandLineArguments1.cxx b/Source/kwsys/testCommandLineArguments1.cxx index b65c37f..6eb465d 100644 --- a/Source/kwsys/testCommandLineArguments1.cxx +++ b/Source/kwsys/testCommandLineArguments1.cxx @@ -11,16 +11,16 @@ ============================================================================*/ #include "kwsysPrivate.h" #include KWSYS_HEADER(CommandLineArguments.hxx) -#include KWSYS_HEADER(ios/iostream) -#include KWSYS_HEADER(stl/vector) // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. #if 0 # include "CommandLineArguments.hxx.in" -# include "kwsys_ios_iostream.h.in" #endif +#include <iostream> +#include <vector> + #include <assert.h> /* assert */ #include <string.h> /* strcmp */ @@ -31,7 +31,7 @@ int testCommandLineArguments1(int argc, char* argv[]) int n = 0; char* m = 0; - kwsys_stl::string p; + std::string p; int res = 0; typedef kwsys::CommandLineArguments argT; @@ -43,27 +43,27 @@ int testCommandLineArguments1(int argc, char* argv[]) if ( !arg.Parse() ) { - kwsys_ios::cerr << "Problem parsing arguments" << kwsys_ios::endl; + std::cerr << "Problem parsing arguments" << std::endl; res = 1; } if ( n != 24 ) { - kwsys_ios::cout << "Problem setting N. Value of N: " << n << kwsys_ios::endl; + std::cout << "Problem setting N. Value of N: " << n << std::endl; res = 1; } if ( !m || strcmp(m, "test value") != 0 ) { - kwsys_ios::cout << "Problem setting M. Value of M: " << m << kwsys_ios::endl; + std::cout << "Problem setting M. Value of M: " << m << std::endl; res = 1; } if ( p != "1" ) { - kwsys_ios::cout << "Problem setting P. Value of P: " << p << kwsys_ios::endl; + std::cout << "Problem setting P. Value of P: " << p << std::endl; res = 1; } - kwsys_ios::cout << "Value of N: " << n << kwsys_ios::endl; - kwsys_ios::cout << "Value of M: " << m << kwsys_ios::endl; - kwsys_ios::cout << "Value of P: " << p << kwsys_ios::endl; + std::cout << "Value of N: " << n << std::endl; + std::cout << "Value of M: " << m << std::endl; + std::cout << "Value of P: " << p << std::endl; if ( m ) { delete [] m; @@ -79,25 +79,25 @@ int testCommandLineArguments1(int argc, char* argv[]) }; if ( newArgc != 9 ) { - kwsys_ios::cerr << "Bad number of unused arguments: " << newArgc << kwsys_ios::endl; + std::cerr << "Bad number of unused arguments: " << newArgc << std::endl; res = 1; } for ( cc = 0; cc < newArgc; ++ cc ) { assert(newArgv[cc]); /* Quiet Clang scan-build. */ - kwsys_ios::cout << "Unused argument[" << cc << "] = [" << newArgv[cc] << "]" - << kwsys_ios::endl; + std::cout << "Unused argument[" << cc << "] = [" << newArgv[cc] << "]" + << std::endl; if ( cc >= 9 ) { - kwsys_ios::cerr << "Too many unused arguments: " << cc << kwsys_ios::endl; + std::cerr << "Too many unused arguments: " << cc << std::endl; res = 1; } else if ( valid_unused_args[cc] && strcmp(valid_unused_args[cc], newArgv[cc]) != 0 ) { - kwsys_ios::cerr << "Bad unused argument [" << cc << "] \"" + std::cerr << "Bad unused argument [" << cc << "] \"" << newArgv[cc] << "\" should be: \"" << valid_unused_args[cc] << "\"" - << kwsys_ios::endl; + << std::endl; res = 1; } } |