Exemplo n.º 1
0
 def test_a_multi_line_comment_left_open(self):
     self.assertEqual(["", "/* world ", "this /"],
                      java_thing(["hello", "/* world ", "this /"]))
Exemplo n.º 2
0
 def test_multiple_lines_with_content_horrible_case(self):
     # ah this is horrible
     self.assertEqual(
         ["", "/* world *//*foo", "this /", "is a test*/"],
         java_thing(["hello", "/* world *//*foo", "this /", "is a test*/"]))
Exemplo n.º 3
0
 def test_multiple_lines_with_content_horrible_case2(self):
     # I might start using comments less now ;)
     self.assertEqual(
         ["", "/* world ", "this /", "is a test*//*cats*/"],
         java_thing(["hello", "/* world ", "this /",
                     "is a test*//*cats*/"]))
Exemplo n.º 4
0
 def test_multiple_lines_empty(self):
     self.assertEqual(["", "", "", ""],
                      java_thing(["hello", "world", "this /", "is a test"]))
Exemplo n.º 5
0
 def test_multiple_lines_with_content(self):
     self.assertEqual(["", "/* world", "this /", "is a test*/"],
                      java_thing(
                          ["hello", "/* world", "this /", "is a test*/"]))
Exemplo n.º 6
0
 def test_two_comments_one_line(self):
     self.assertEqual(["/*hello*//*hello*/"],
                      java_thing(["/*hello*/ some code /*hello*/"]))
Exemplo n.º 7
0
 def test_two_comments_one_line_with_strings(self):
     self.assertEqual([""], java_thing(["'/*hello*/ some code /*hello*/"]))
Exemplo n.º 8
0
 def test_multi_line_single_line_complex(self):
     self.assertEqual(["/*hello*/"],
                      java_thing(["asdfasdf/*hello*/asdfsdaasdf*/"]))
Exemplo n.º 9
0
 def test_multi_line_single_line(self):
     # so we can have a multi line comment in this style that is in fact a single line comment as such
     self.assertEqual(["/*hello*/"], java_thing(["/*hello*/"]))
Exemplo n.º 10
0
 def test_basic_with_strings2(self):
     self.assertEqual(["//cats"], java_thing(["'//hello'//cats"]))
Exemplo n.º 11
0
 def test_basic_with_strings(self):
     self.assertEqual([""], java_thing(["'//hello"]))
Exemplo n.º 12
0
 def test_basic2(self):
     self.assertEqual(["//hello"], java_thing(["asdf//hello"]))