Export of internal Abseil changes.
-- 788c948f698afe5998738cbb40b0629668640d73 by Derek Mauro <dmauro@google.com>: Add an empty raw_logging_internal library. The raw_logging sources will eventually migrate here. This target will only contain internal sources. Abseil compatibility guidelines require users not depend on internals. https://abseil.io/about/compatibility PiperOrigin-RevId: 260712817 -- 8ea947ec54f47fb02e97597d243cb63aa4c5fe0b by Abseil Team <absl-team@google.com>: Fixed an incorrect version number test for optional,etc. availability in iOS. Added tests for watchOS and tvOS. PiperOrigin-RevId: 260490390 -- 53af0544277dc3020b81d16ce110e7bc89f5cf6e by Jorg Brown <jorg@google.com>: Test the error-string path a bit more. PiperOrigin-RevId: 260175886 GitOrigin-RevId: 788c948f698afe5998738cbb40b0629668640d73 Change-Id: I366b73331857dc5a1db843b650c2ba27a69a141e
This commit is contained in:
		
							parent
							
								
									36d37ab992
								
							
						
					
					
						commit
						52e88ee56b
					
				
					 4 changed files with 34 additions and 4 deletions
				
			
		|  | @ -72,6 +72,11 @@ TEST(CEscape, EscapeAndUnescape) { | |||
|       EXPECT_TRUE(absl::CUnescape(escaped, &unescaped_str)); | ||||
|       EXPECT_EQ(unescaped_str, original); | ||||
| 
 | ||||
|       unescaped_str.erase(); | ||||
|       std::string error; | ||||
|       EXPECT_TRUE(absl::CUnescape(escaped, &unescaped_str, &error)); | ||||
|       EXPECT_EQ(error, ""); | ||||
| 
 | ||||
|       // Check in-place unescaping
 | ||||
|       std::string s = escaped; | ||||
|       EXPECT_TRUE(absl::CUnescape(s, &s)); | ||||
|  | @ -150,7 +155,8 @@ TEST(CEscape, BasicEscaping) { | |||
| 
 | ||||
| TEST(Unescape, BasicFunction) { | ||||
|   epair tests[] = | ||||
|     {{"\\u0030", "0"}, | ||||
|     {{"", ""}, | ||||
|      {"\\u0030", "0"}, | ||||
|      {"\\u00A3", "\xC2\xA3"}, | ||||
|      {"\\u22FD", "\xE2\x8B\xBD"}, | ||||
|      {"\\U00010000", "\xF0\x90\x80\x80"}, | ||||
|  | @ -173,6 +179,9 @@ TEST(Unescape, BasicFunction) { | |||
|     std::string out; | ||||
|     EXPECT_FALSE(absl::CUnescape(e, &out, &error)); | ||||
|     EXPECT_FALSE(error.empty()); | ||||
| 
 | ||||
|     out.erase(); | ||||
|     EXPECT_FALSE(absl::CUnescape(e, &out)); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue