From 3d12f8d2466d6a000bb116b4363a695c862ab52d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 23 Oct 2013 21:38:07 +0200 Subject: UriUtil: uri_remove_auth() returns std::string --- test/test_util.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/test_util.cxx') diff --git a/test/test_util.cxx b/test/test_util.cxx index eaa64f3e3..6ed4d9e82 100644 --- a/test/test_util.cxx +++ b/test/test_util.cxx @@ -31,13 +31,13 @@ public: } void TestRemoveAuth() { - CPPUNIT_ASSERT_EQUAL((char *)nullptr, + CPPUNIT_ASSERT_EQUAL(std::string(), uri_remove_auth("http://www.example.com/")); - CPPUNIT_ASSERT_EQUAL(0, strcmp(uri_remove_auth("http://foo:bar@www.example.com/"), - "http://www.example.com/")); - CPPUNIT_ASSERT_EQUAL(0, strcmp(uri_remove_auth("http://foo@www.example.com/"), - "http://www.example.com/")); - CPPUNIT_ASSERT_EQUAL((char *)nullptr, + CPPUNIT_ASSERT_EQUAL(std::string("http://www.example.com/"), + uri_remove_auth("http://foo:bar@www.example.com/")); + CPPUNIT_ASSERT_EQUAL(std::string("http://www.example.com/"), + uri_remove_auth("http://foo@www.example.com/")); + CPPUNIT_ASSERT_EQUAL(std::string(), uri_remove_auth("http://www.example.com/f:oo@bar")); } }; -- cgit v1.2.3