logic: Codeview Snippet order

Sorting the Snippets in. the Codeview. Active Token first then declaration,
filename and extension
This commit is contained in:
Andreas Stallinger
2014-10-24 13:37:06 +02:00
parent a1b874c520
commit 0a4c65d198
17 changed files with 157 additions and 42 deletions
+12
View File
@@ -66,6 +66,18 @@ public:
TS_ASSERT_EQUALS(FileSystem::fileName("data/FileSystemTestSuite/Settings/player.h"), "player.h");
}
void test_filesystem_extracts_extension()
{
TS_ASSERT_EQUALS(FileSystem::extension("data/FileSystemTestSuite/tictactoe.h"), ".h");
TS_ASSERT_EQUALS(FileSystem::extension("data/FileSystemTestSuite/tictactoe.cpp"), ".cpp");
}
void test_filesystem_extract_filepath_without_extension()
{
TS_ASSERT_EQUALS(FileSystem::filePathWithoutExtension("data/FileSystemTestSuite/tictactoe.h"), "data/FileSystemTestSuite/tictactoe");
TS_ASSERT_EQUALS(FileSystem::filePathWithoutExtension("data/FileSystemTestSuite/tictactoe.cpp"), "data/FileSystemTestSuite/tictactoe");
}
private:
bool isInVector(const std::vector<std::string>& files, const std::string filename)
{