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"
|
|
|
|
|
2016-08-17 02:08:13 +03:00
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
|
2016-09-05 23:09:49 +03:00
|
|
|
#define cmPassed(m) std::cout << "Passed: " << (m) << "\n"
|
2016-05-16 17:34:04 +03:00
|
|
|
#define cmFailed(m) \
|
2016-09-05 23:09:49 +03:00
|
|
|
std::cout << "FAILED: " << (m) << "\n"; \
|
2016-05-16 17:34:04 +03:00
|
|
|
failed = 1
|
2011-12-24 00:41:38 +04:00
|
|
|
|
2016-08-17 02:49:57 +03:00
|
|
|
int testSystemTools(int /*unused*/, char* /*unused*/ [])
|
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;
|
|
|
|
}
|