2011-12-24 00:41:38 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
|
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
|
|
|
#include "cmSystemTools.h"
|
|
|
|
|
|
|
|
#define cmPassed(m) std::cout << "Passed: " << m << "\n"
|
2016-05-16 17:34:04 +03:00
|
|
|
#define cmFailed(m) \
|
|
|
|
std::cout << "FAILED: " << m << "\n"; \
|
|
|
|
failed = 1
|
2011-12-24 00:41:38 +04:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
int testSystemTools(int, char* [])
|
2011-12-24 00:41:38 +04:00
|
|
|
{
|
|
|
|
int failed = 0;
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// Test cmSystemTools::UpperCase
|
|
|
|
std::string str = "abc";
|
|
|
|
std::string strupper = "ABC";
|
2016-05-16 17:34:04 +03:00
|
|
|
if (cmSystemTools::UpperCase(str) == strupper) {
|
2011-12-24 00:41:38 +04:00
|
|
|
cmPassed("cmSystemTools::UpperCase is working");
|
2016-05-16 17:34:04 +03:00
|
|
|
} else {
|
2011-12-24 00:41:38 +04:00
|
|
|
cmFailed("cmSystemTools::UpperCase is working");
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2011-12-24 00:41:38 +04:00
|
|
|
return failed;
|
|
|
|
}
|