From: Loic Dachary Date: Fri, 6 Dec 2013 14:43:23 +0000 (+0100) Subject: crush: unittest s/std::string/string/ X-Git-Tag: v0.74~26^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=16ac59042eb2299fd8f940203f0273fd300882f4;p=ceph.git crush: unittest s/std::string/string/ Signed-off-by: Loic Dachary --- diff --git a/src/test/crush/TestCrushWrapper.cc b/src/test/crush/TestCrushWrapper.cc index b53bdc847c33..fb968b41c4b9 100644 --- a/src/test/crush/TestCrushWrapper.cc +++ b/src/test/crush/TestCrushWrapper.cc @@ -65,11 +65,11 @@ TEST(CrushWrapper, check_item_loc) { float weight; map loc; loc["root"] = "default"; - const std::string HOST("host0"); + const string HOST("host0"); loc["host"] = HOST; EXPECT_FALSE(c->check_item_loc(g_ceph_context, item, loc, &weight)); } - const std::string OSD("osd.0"); + const string OSD("osd.0"); { map loc; loc["root"] = "default"; @@ -159,7 +159,7 @@ TEST(CrushWrapper, insert_item) { } // implicit creation of a bucket { - std::string name = "NAME"; + string name = "NAME"; map loc; loc["root"] = "default"; loc["host"] = name; @@ -170,7 +170,7 @@ TEST(CrushWrapper, insert_item) { } // adding to an existing item name that is not associated with a bucket { - std::string name = "ITEM_WITHOUT_BUCKET"; + string name = "ITEM_WITHOUT_BUCKET"; map loc; loc["root"] = "default"; loc["host"] = name; @@ -258,7 +258,7 @@ TEST(CrushWrapper, insert_item) { TEST(CrushWrapper, item_bucket_names) { CrushWrapper *c = new CrushWrapper; int index = 123; - std::string name = "NAME"; + string name = "NAME"; EXPECT_EQ(-EINVAL, c->set_item_name(index, "\001")); EXPECT_EQ(0, c->set_item_name(index, name)); EXPECT_TRUE(c->name_exists(name)); @@ -271,7 +271,7 @@ TEST(CrushWrapper, item_bucket_names) { TEST(CrushWrapper, bucket_types) { CrushWrapper *c = new CrushWrapper; int index = 123; - std::string name = "NAME"; + string name = "NAME"; c->set_type_name(index, name); EXPECT_EQ(1, c->get_num_type_names()); EXPECT_EQ(index, c->get_type_id(name));