def test_hex(self): input_str = r'"\x27"' result = day8.get_num_encoded_chars(input_str) self.assertEqual(11, result)
def test_chars_only_string(self): input_str = r'"abc"' result = day8.get_num_encoded_chars(input_str) self.assertEqual(9, result)
def test_escaped_quote(self): input_str = r'"aaa\"aaa"' result = day8.get_num_encoded_chars(input_str) self.assertEqual(16, result)
def test_empty_string(self): input_str = r'""' result = day8.get_num_encoded_chars(input_str) self.assertEqual(6, result)