Path: Removed java/c# handling. Thanks amai.

This commit is contained in:
Daniel Marjamäki 2012-10-03 19:47:14 +02:00
parent 1e024a9abc
commit dbddbe75bf
3 changed files with 0 additions and 42 deletions

View File

@ -192,18 +192,6 @@ bool Path::isCPP(const std::string &path)
return(getFilenameExtension(path) == ".C");
}
bool Path::isJava(const std::string &path)
{
const std::string extension = getFilenameExtensionInLowerCase(path);
return(extension == ".java");
}
bool Path::isCSharp(const std::string &path)
{
const std::string extension = getFilenameExtensionInLowerCase(path);
return(extension == ".cs");
}
bool Path::acceptFile(const std::string &filename)
{
return(Path::isCPP(filename) || Path::isC(filename));

View File

@ -115,20 +115,6 @@ public:
* @return true if extension is meant for C++ files
*/
static bool isCPP(const std::string &extensionInLowerCase);
/**
* @brief Identify language based on file extension.
* @param extensionInLowerCase e.g. ".java"
* @return true if extension is meant for Java files
*/
static bool isJava(const std::string &extensionInLowerCase);
/**
* @brief Identify language based on file extension.
* @param extensionInLowerCase e.g. ".cs"
* @return true if extension is meant for C# files
*/
static bool isCSharp(const std::string &extensionInLowerCase);
};
/// @}

View File

@ -33,8 +33,6 @@ private:
TEST_CASE(getRelative);
TEST_CASE(is_c);
TEST_CASE(is_cpp);
TEST_CASE(is_java);
TEST_CASE(is_csharp);
}
void simplify_path() const {
@ -119,20 +117,6 @@ private:
ASSERT(Path::isCPP("C:\\foo\\index.cpp"));
ASSERT(Path::isCPP("C:\\foo\\index.Cpp"));
}
void is_java() const {
ASSERT(Path::isJava("index.cpp")==false);
ASSERT(Path::isJava("index.java"));
ASSERT(Path::isJava("C:\\foo\\index.java"));
ASSERT(Path::isJava("C:\\foo\\index.Java"));
}
void is_csharp() const {
ASSERT(Path::isCSharp("index.cpp")==false);
ASSERT(Path::isCSharp("index.cs"));
ASSERT(Path::isCSharp("C:\\foo\\index.cs"));
ASSERT(Path::isCSharp("C:\\foo\\index.Cs"));
}
};
REGISTER_TEST(TestPath)