Browse Source

[2302] Untabify and delete trailing whitespace

Mukund Sivaraman 12 years ago
parent
commit
2975fbae44
2 changed files with 15 additions and 15 deletions
  1. 8 8
      src/lib/cc/data.h
  2. 7 7
      src/lib/cc/tests/data_unittests.cc

+ 8 - 8
src/lib/cc/data.h

@@ -71,7 +71,7 @@ public:
 /// the type in question.
 ///
 class Element {
-    
+
 private:
     // technically the type could be omitted; is it useful?
     // should we remove it or replace it with a pure virtual
@@ -112,7 +112,7 @@ public:
     /// \returns true if the other ElementPtr has the same type and
     ///          value
     virtual bool equals(const Element& other) const = 0;
-    
+
     /// Converts the Element to JSON format and appends it to
     /// the given stringstream.
     virtual void toJSON(std::ostream& ss) const = 0;
@@ -209,7 +209,7 @@ public:
     virtual size_t size() const;
     //@}
 
-    
+
     /// \name MapElement functions
     ///
     /// \brief If the Element on which these functions are called are not
@@ -258,7 +258,7 @@ public:
 
 
     /// \name Factory functions
-    
+
     // TODO: should we move all factory functions to a different class
     // so as not to burden the Element base with too many functions?
     // and/or perhaps even to a separate header?
@@ -349,7 +349,7 @@ public:
     /// These function pparse the wireformat at the given stringstream
     /// (of the given length). If there is a parse error an exception
     /// of the type isc::cc::DecodeError is raised.
-    
+
     //@{
     /// Creates an Element from the wire format in the given
     /// stringstream of the given length.
@@ -495,7 +495,7 @@ public:
         return (m.find(s) != m.end());
     }
     void toJSON(std::ostream& ss) const;
-    
+
     // we should name the two finds better...
     // find the element at id; raises TypeError if one of the
     // elements at path except the one we're looking for is not a
@@ -569,6 +569,6 @@ bool operator!=(const Element& a, const Element& b);
 } }
 #endif // _ISC_DATA_H
 
-// Local Variables: 
+// Local Variables:
 // mode: c++
-// End: 
+// End:

+ 7 - 7
src/lib/cc/tests/data_unittests.cc

@@ -112,7 +112,7 @@ TEST(Element, from_and_to_json) {
         std::string s = std::string(pe.what());
         EXPECT_EQ("String expected in <string>:1:3", s);
     }
-    
+
     sv.clear();
     sv.push_back("{1}");
     //ElementPtr ep = Element::fromJSON("\"aaa\nbbb\"err");
@@ -233,7 +233,7 @@ TEST(Element, create_and_value_throws) {
     EXPECT_THROW(el->contains("foo"), TypeError);
     ConstElementPtr tmp;
     EXPECT_FALSE(el->find("foo", tmp));
-    
+
 
     el = Element::create(1.1);
     EXPECT_THROW(el->intValue(), TypeError);
@@ -399,7 +399,7 @@ TEST(Element, MapElement) {
     // this function checks the specific functions for ListElements
     ElementPtr el = Element::fromJSON("{ \"name\": \"foo\", \"value1\": \"bar\", \"value2\": { \"number\": 42 } }");
     ConstElementPtr el2;
-    
+
     EXPECT_EQ(el->get("name")->stringValue(), "foo");
     EXPECT_EQ(el->get("value2")->getType(), Element::map);
 
@@ -413,10 +413,10 @@ TEST(Element, MapElement) {
 
     EXPECT_EQ(el->find("value2/number")->intValue(), 42);
     EXPECT_TRUE(isNull(el->find("value2/nothing/")));
-   
+
     EXPECT_EQ(el->find("value1")->stringValue(), "bar");
     EXPECT_EQ(el->find("value1/")->stringValue(), "bar");
-    
+
     EXPECT_TRUE(el->find("value1", el2));
     EXPECT_EQ("bar", el2->stringValue());
     EXPECT_FALSE(el->find("name/error", el2));
@@ -428,7 +428,7 @@ TEST(Element, MapElement) {
                        "9123456789abcdefa123456789abcdefb123456789abcdef"
                        "c123456789abcdefd123456789abcdefe123456789abcdef"
                        "f123456789abcde");
-    
+
     EXPECT_EQ(255, long_maptag.length()); // check prerequisite
     el = Element::fromJSON("{ \"" + long_maptag + "\": \"bar\"}");
     EXPECT_EQ("bar", el->find(long_maptag)->stringValue());
@@ -707,7 +707,7 @@ TEST(Element, merge) {
     c = Element::fromJSON("{ \"a\": { \"b\": \"c\" } }");
     merge(b, a);
     EXPECT_EQ(*b, *c);
-    
+
     // And some tests with multiple values
     a = Element::fromJSON("{ \"a\": 1, \"b\": true, \"c\": null }");
     b = Element::fromJSON("{ \"a\": 1, \"b\": null, \"c\": \"a string\" }");