tests/ITCFTP.cpp
static inline void checkFTPCommandResponse(CFTP &ftpServer, std::set<std::uint16_t> expectedResults, int count = -1)
{
    if (expectedResults.find(ftpServer.getCommandStatusCode()) == expectedResults.end())
    {
        if (count != -1)
            std::cout << "Count [" << count << "]";
        std::cout << "Status code returned : [" << ftpServer.getCommandStatusCode() << "], when expecting [";
        for (auto result : expectedResults)
            std::cout << result;
        std::cout << "] [Failure]" << std::endl;
        std::cout << "Full response = " << ftpServer.getCommandResponse();
    }
    else
    {
        if (count == -1)
        {
            std::cout << ftpServer.getLastCommand() << " [Success]" << std::endl;
        }
    }
}
//
// Check FTP command return status against expected  values and display any errors.
//
Check FTP command return status against expected  values and display any errors.
Check FTP command return status against expected values and display any errors .
static inline void checkFTPCommandResponse(CFTP &ftpServer, std::set<std::uint16_t> expectedResults, int count = -1)
{
    if (expectedResults.find(ftpServer.getCommandStatusCode()) == expectedResults.end())
    {
        if (count != -1)
            std::cout << "Count [" << count << "]";
        std::cout << "Status code returned : [" << ftpServer.getCommandStatusCode() << "], when expecting [";
        for (auto result : expectedResults)
            std::cout << result;
        std::cout << "] [Failure]" << std::endl;
        std::cout << "Full response = " << ftpServer.getCommandResponse();
    }
    else
    {
        if (count == -1)
        {
            std::cout << ftpServer.getLastCommand() << " [Success]" << std::endl;
        }
    }
}
static inline void checkFTPCommandResponse ( CFTP & ftpServer , std :: set < std :: uint16_t > expectedResults , int count = -1 ) { if ( expectedResults . find ( ftpServer . getCommandStatusCode ( ) ) == expectedResults . end ( ) ) { if ( count != -1 ) std :: cout << " " << count << " " ; std :: cout << " " << ftpServer . getCommandStatusCode ( ) << " " ; for ( auto result : expectedResults ) std :: cout << result ; std :: cout << " " << std :: endl ; std :: cout << " " << ftpServer . getCommandResponse ( ) ; } else { if ( count == -1 ) { std :: cout << ftpServer . getLastCommand ( ) << " " << std :: endl ; } } }
Check FTP command return status against expected  values and display any errors.
Check FTP command return status against expected values and display any errors .