]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3086] addressed comments
authorRazvan Becheriu <razvan@isc.org>
Wed, 4 Oct 2023 06:23:15 +0000 (09:23 +0300)
committerRazvan Becheriu <razvan@isc.org>
Fri, 6 Oct 2023 09:02:15 +0000 (09:02 +0000)
src/lib/eval/tests/context_unittest.cc
src/lib/eval/tests/token_unittest.cc

index 4e75a31c935545d38e8d913b5951a8adf26723bc..e0d5aa1f920b1c84516e27e4d861b88dc0160a5d 100644 (file)
@@ -865,7 +865,8 @@ TEST_F(EvalContextTest, string) {
 TEST_F(EvalContextTest, stringComplex) {
     EvalContext eval(Option::V4);
 
-    char data[] = "'12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f' == 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'";
+    char data[] = "'12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f' == "
+            "'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'";
     EXPECT_NO_THROW(parsed_ = eval.parseString(string(data, sizeof(data) - 1)));
     EXPECT_TRUE(parsed_);
 
@@ -1595,7 +1596,7 @@ TEST_F(EvalContextTest, lcaseComplex) {
     EvalContext eval(Option::V4);
 
     char data[] = "lcase('12345~!@#$%^&*()_+LoWeR{}[];:<>/?\\67890\t \0\b\r\f') == "
-                  "'12345~!@#$%^&*()_+lower{}[];:<>/?\\67890\t \0\b\r\f'";
+            "'12345~!@#$%^&*()_+lower{}[];:<>/?\\67890\t \0\b\r\f'";
     EXPECT_NO_THROW(parsed_ = eval.parseString(string(data, sizeof(data) - 1)));
     EXPECT_TRUE(parsed_);
 
@@ -1639,7 +1640,7 @@ TEST_F(EvalContextTest, ucaseComplex) {
     EvalContext eval(Option::V4);
 
     char data[] = "ucase('12345~!@#$%^&*()_+uPpEr{}[];:<>/?\\67890\t \0\b\r\f') == "
-                  "'12345~!@#$%^&*()_+UPPER{}[];:<>/?\\67890\t \0\b\r\f'";
+            "'12345~!@#$%^&*()_+UPPER{}[];:<>/?\\67890\t \0\b\r\f'";
     EXPECT_NO_THROW(parsed_ = eval.parseString(string(data, sizeof(data) - 1)));
     EXPECT_TRUE(parsed_);
 
index 2ef7a32a1a6ce2406e071100d807ebf24c95fa4f..4ff90d8718961c603ffac6b8cd3c89e9263674b4 100644 (file)
@@ -592,7 +592,8 @@ TEST_F(TokenTest, string4) {
 // This simple test checks that a TokenString, representing a constant string,
 // can be used in Pkt4 evaluation. (The actual packet is not used)
 TEST_F(TokenTest, string4Complex) {
-    char data[] = "12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f'\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+    char data[] = "12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f'\""
+            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
     string data_str(data, sizeof(data) - 1);
     // Store constant string in the TokenString object.
     ASSERT_NO_THROW(t_.reset(new TokenString(data_str)));
@@ -607,7 +608,9 @@ TEST_F(TokenTest, string4Complex) {
     // Check that the debug output was correct.  Add the strings
     // to the test vector in the class and then call checkFile
     // for comparison
-    char expected[] = "EVAL_DEBUG_STRING Pushing text string '12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f'\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'";
+    char expected[] = "EVAL_DEBUG_STRING Pushing text string '"
+            "12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f'\""
+            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'";
     string expected_str(expected, sizeof(expected) - 1);
     addString(expected_str);
     EXPECT_TRUE(checkFile());
@@ -637,7 +640,8 @@ TEST_F(TokenTest, string6) {
 // This simple test checks that a TokenString, representing a constant string,
 // can be used in Pkt6 evaluation. (The actual packet is not used)
 TEST_F(TokenTest, string6Complex) {
-    char data[] = "12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f'\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+    char data[] = "12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f'\""
+            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
     string data_str(data, sizeof(data) - 1);
     // Store constant string in the TokenString object.
     ASSERT_NO_THROW(t_.reset(new TokenString(data_str)));
@@ -652,7 +656,9 @@ TEST_F(TokenTest, string6Complex) {
     // Check that the debug output was correct.  Add the strings
     // to the test vector in the class and then call checkFile
     // for comparison
-    char expected[] = "EVAL_DEBUG_STRING Pushing text string '12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f'\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'";
+    char expected[] = "EVAL_DEBUG_STRING Pushing text string '"
+            "12345~!@#$%^&*()_+{}[];:<>/?\\67890\t \0\b\r\f'\""
+            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'";
     string expected_str(expected, sizeof(expected) - 1);
     addString(expected_str);
     EXPECT_TRUE(checkFile());
@@ -835,8 +841,10 @@ TEST_F(TokenTest, lcaseComplex) {
     // Check that the debug output was correct.  Add the strings
     // to the test vector in the class and then call checkFile
     // for comparison
-    char expected[] = "EVAL_DEBUG_LCASE Poping string '12345~!@#$%^&*()_+LoWeR{}[];:<>/?\\67890\t \0\b\r\f' "
-                      "and pushing converted value to lower case '12345~!@#$%^&*()_+lower{}[];:<>/?\\67890\t \0\b\r\f'";
+    char expected[] = "EVAL_DEBUG_LCASE Poping string '"
+            "12345~!@#$%^&*()_+LoWeR{}[];:<>/?\\67890\t \0\b\r\f' "
+            "and pushing converted value to lower case '"
+            "12345~!@#$%^&*()_+lower{}[];:<>/?\\67890\t \0\b\r\f'";
     string expected_str(expected, sizeof(expected) - 1);
     addString(expected_str);
     EXPECT_TRUE(checkFile());
@@ -884,8 +892,10 @@ TEST_F(TokenTest, ucaseComplex) {
     // Check that the debug output was correct.  Add the strings
     // to the test vector in the class and then call checkFile
     // for comparison
-    char expected[] = "EVAL_DEBUG_UCASE Poping string '12345~!@#$%^&*()_+uPpEr{}[];:<>/?\\67890\t \0\b\r\f' "
-                      "and pushing converted value to upper case '12345~!@#$%^&*()_+UPPER{}[];:<>/?\\67890\t \0\b\r\f'";
+    char expected[] = "EVAL_DEBUG_UCASE Poping string '"
+            "12345~!@#$%^&*()_+uPpEr{}[];:<>/?\\67890\t \0\b\r\f' "
+            "and pushing converted value to upper case '"
+            "12345~!@#$%^&*()_+UPPER{}[];:<>/?\\67890\t \0\b\r\f'";
     string expected_str(expected, sizeof(expected) - 1);
     addString(expected_str);
     EXPECT_TRUE(checkFile());