Parcourir la source

[trac4269] Updates per review comments, basically change some variable names

Shawn Routhier il y a 9 ans
Parent
commit
7549535b3a
3 fichiers modifiés avec 8 ajouts et 7 suppressions
  1. 2 2
      src/lib/eval/parser.cc
  2. 2 2
      src/lib/eval/parser.yy
  3. 4 3
      src/lib/eval/tests/context_unittest.cc

+ 2 - 2
src/lib/eval/parser.cc

@@ -763,8 +763,8 @@ namespace isc { namespace eval {
   case 16:
 #line 182 "parser.yy" // lalr1.cc:859
     {
-                      TokenPtr pkt6field(new TokenPkt6(yystack_[0].value.as< TokenPkt6::FieldType > ()));
-                      ctx.expression.push_back(pkt6field);
+                      TokenPtr pkt6_field(new TokenPkt6(yystack_[0].value.as< TokenPkt6::FieldType > ()));
+                      ctx.expression.push_back(pkt6_field);
                   }
 #line 770 "parser.cc" // lalr1.cc:859
     break;

+ 2 - 2
src/lib/eval/parser.yy

@@ -180,8 +180,8 @@ string_expr : STRING
                   }
             | PKT6 "." pkt6_field
                   {
-                      TokenPtr pkt6field(new TokenPkt6($3));
-                      ctx.expression.push_back(pkt6field);
+                      TokenPtr pkt6_field(new TokenPkt6($3));
+                      ctx.expression.push_back(pkt6_field);
                   }
             ;
 

+ 4 - 3
src/lib/eval/tests/context_unittest.cc

@@ -125,8 +125,9 @@ public:
 
     /// @brief checks if the given token is Pkt6 of specified type
     /// @param token token to be checked
-    /// @param type expected type of the Pkt6 field
-    void checkTokenPkt6(const TokenPtr& token, TokenPkt6::FieldType type) {
+    /// @param exp_type expected type of the Pkt6 field
+    void checkTokenPkt6(const TokenPtr& token,
+                        TokenPkt6::FieldType exp_type) {
         ASSERT_TRUE(token);
 
         boost::shared_ptr<TokenPkt6> pkt =
@@ -134,7 +135,7 @@ public:
 
         ASSERT_TRUE(pkt);
 
-        EXPECT_EQ(type, pkt->getType());
+        EXPECT_EQ(exp_type, pkt->getType());
     }
 
     /// @brief checks if the given expression raises the expected message