Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Unified Diff: dbus/string_util_unittest.cc

Issue 16012018: Cleanup: Put DBus unit tests in the dbus namespace, so one does not need to write dbus:: everywhere… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dbus/signal_sender_verification_unittest.cc ('k') | dbus/test_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/string_util_unittest.cc
===================================================================
--- dbus/string_util_unittest.cc (revision 205628)
+++ dbus/string_util_unittest.cc (working copy)
@@ -5,23 +5,27 @@
#include "dbus/string_util.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace dbus {
+
TEST(StringUtilTest, IsValidObjectPath) {
- EXPECT_TRUE(dbus::IsValidObjectPath("/"));
- EXPECT_TRUE(dbus::IsValidObjectPath("/foo/bar"));
- EXPECT_TRUE(dbus::IsValidObjectPath("/hoge_fuga/piyo123"));
+ EXPECT_TRUE(IsValidObjectPath("/"));
+ EXPECT_TRUE(IsValidObjectPath("/foo/bar"));
+ EXPECT_TRUE(IsValidObjectPath("/hoge_fuga/piyo123"));
// Empty string.
- EXPECT_FALSE(dbus::IsValidObjectPath(std::string()));
- // Emptyr elemnt.
- EXPECT_FALSE(dbus::IsValidObjectPath("//"));
- EXPECT_FALSE(dbus::IsValidObjectPath("/foo//bar"));
- EXPECT_FALSE(dbus::IsValidObjectPath("/foo///bar"));
+ EXPECT_FALSE(IsValidObjectPath(std::string()));
+ // Empty element.
+ EXPECT_FALSE(IsValidObjectPath("//"));
+ EXPECT_FALSE(IsValidObjectPath("/foo//bar"));
+ EXPECT_FALSE(IsValidObjectPath("/foo///bar"));
// Trailing '/'.
- EXPECT_FALSE(dbus::IsValidObjectPath("/foo/"));
- EXPECT_FALSE(dbus::IsValidObjectPath("/foo/bar/"));
+ EXPECT_FALSE(IsValidObjectPath("/foo/"));
+ EXPECT_FALSE(IsValidObjectPath("/foo/bar/"));
// Not beginning with '/'.
- EXPECT_FALSE(dbus::IsValidObjectPath("foo/bar"));
+ EXPECT_FALSE(IsValidObjectPath("foo/bar"));
// Invalid characters.
- EXPECT_FALSE(dbus::IsValidObjectPath("/foo.bar"));
- EXPECT_FALSE(dbus::IsValidObjectPath("/foo/*"));
- EXPECT_FALSE(dbus::IsValidObjectPath("/foo/bar(1)"));
+ EXPECT_FALSE(IsValidObjectPath("/foo.bar"));
+ EXPECT_FALSE(IsValidObjectPath("/foo/*"));
+ EXPECT_FALSE(IsValidObjectPath("/foo/bar(1)"));
}
+
+} // namespace dbus
« no previous file with comments | « dbus/signal_sender_verification_unittest.cc ('k') | dbus/test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698