<s> """<STR_LIT>""" <EOL> from google . apputils import basetest <EOL> from google . protobuf import text_encoding <EOL> TEST_VALUES = [ <EOL> ( "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> b"<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> b"<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> b"<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> b"<STR_LIT>" ) ] <EOL> class TextEncodingTestCase ( basetest . TestCase ) : <EOL> def testCEscape ( self ) : <EOL> for escaped , escaped_utf8 , unescaped in TEST_VALUES : <EOL> self . assertEquals ( escaped , <EOL> text_encoding . CEscape ( unescaped , as_utf8 = False ) ) <EOL> self . assertEquals ( escaped_utf8 , <EOL> text_encoding . CEscape ( unescaped , as_utf8 = True ) ) <EOL> def testCUnescape ( self ) : <EOL> for escaped , escaped_utf8 , unescaped in TEST_VALUES : <EOL> self . assertEquals ( unescaped , text_encoding . CUnescape ( escaped ) ) <EOL> self . assertEquals ( unescaped , text_encoding . CUnescape ( escaped_utf8 ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> basetest . main ( ) </s>
