def test_expected_length_simple(self): self.assertEqual( 6, day08.count_literals('"dpmxnj"\n') )
def test_single_escaped_quote(self): self.assertEqual( 7, day08.count_literals('"aaa\"aaa"\n') )
def test_basic_hex_escape(self): self.assertEqual( 1, day08.count_literals('"\x27"\n') )
def test_extra_simple(self): self.assertEqual( 3, day08.count_literals('"abc"\n') )
def test_just_double_quotes(self): self.assertEqual( 0, day08.count_literals('""\n') )
def test_escaped_hex_notation(self): self.assertEqual( 15, day08.count_literals('"aixfk\xc0iom\x21vueob"\n') )
def test_escaped_backslash(self): self.assertEqual( 12, day08.count_literals('"roc\\vra\\lhrm"\n') )
def test_escaped_quotes(self): self.assertEqual( 23, day08.count_literals('"twybw\"cdvf\"mjdajurokbce"\n') )