diff options
Diffstat (limited to 'test/FeatureConfigTest.cc')
| -rw-r--r-- | test/FeatureConfigTest.cc | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/test/FeatureConfigTest.cc b/test/FeatureConfigTest.cc index e744784d..fa0952e0 100644 --- a/test/FeatureConfigTest.cc +++ b/test/FeatureConfigTest.cc @@ -8,13 +8,13 @@ class FeatureConfigTest:public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(FeatureConfigTest); CPPUNIT_TEST(testGetDefaultPort); CPPUNIT_TEST(testIsSupported); - CPPUNIT_TEST(testGetConfigurationSummary); + CPPUNIT_TEST(testFeatureSummary); CPPUNIT_TEST_SUITE_END(); public: void testGetDefaultPort(); void testIsSupported(); - void testGetConfigurationSummary(); + void testFeatureSummary(); }; @@ -30,51 +30,48 @@ void FeatureConfigTest::testGetDefaultPort() { } void FeatureConfigTest::testIsSupported() { - CPPUNIT_ASSERT_EQUAL(true, - FeatureConfig::getInstance()->isSupported("http")); #ifdef ENABLE_SSL CPPUNIT_ASSERT_EQUAL(true, - FeatureConfig::getInstance()->isSupported("https")); + FeatureConfig::getInstance()->isSupported + (FeatureConfig::FEATURE_HTTPS)); #else CPPUNIT_ASSERT_EQUAL(false, - FeatureConfig::getInstance()->isSupported("https")); + FeatureConfig::getInstance()->isSupported + (FeatureConfig::FEATURE_HTTPS)); #endif // ENABLE_SSL - CPPUNIT_ASSERT_EQUAL(true, - FeatureConfig::getInstance()->isSupported("ftp")); CPPUNIT_ASSERT_EQUAL(false, - FeatureConfig::getInstance()->isSupported("ftps")); + FeatureConfig::getInstance()->isSupported("FTPS")); } -void FeatureConfigTest::testGetConfigurationSummary() { - CPPUNIT_ASSERT_EQUAL(std::string("http: yes\n") -#ifdef ENABLE_SSL - +"https: yes\n" +void FeatureConfigTest::testFeatureSummary() { + CPPUNIT_ASSERT_EQUAL( +#ifdef ENABLE_ASYNC_DNS + std::string("Async DNS, ") #else - +"https: no\n" -#endif // ENABLE_SSL - +"ftp: yes\n" + std::string() +#endif // ENABLE_ASYNC_DNS #ifdef ENABLE_BITTORRENT - +"bittorrent: yes\n" + +std::string("BitTorrent, ") #else - +"bittorrent: no\n" + +std::string() #endif // ENABLE_BITTORRENT -#ifdef ENABLE_METALINK - +"metalink: yes\n" +#ifdef ENABLE_SSL + +std::string("HTTPS, ") #else - +"metalink: no\n" -#endif // ENABLE_METALINK + +std::string() +#endif // ENABLE_SSL #ifdef ENABLE_MESSAGE_DIGEST - +"message digest: yes\n" + +std::string("Message Digest, ") #else - +"message digest: no\n" + +std::string() #endif // ENABLE_MESSAGE_DIGEST -#ifdef ENABLE_ASYNC_DNS - +"async dns: yes\n" +#ifdef ENABLE_METALINK + +std::string("Metalink") #else - +"async dns: no\n" -#endif // ENABLE_ASYNC_DNS + +std::string() +#endif // ENABLE_METALINK , - FeatureConfig::getInstance()->getConfigurationSummary()); + FeatureConfig::getInstance()->featureSummary()); } } // namespace aria2 |
