Beispiel #1
0
 def test_a_multi_line_comment_left_open(self):
     self.assertEqual(["", "/* world ", "this /"],
                      java_thing(["hello", "/* world ", "this /"]))
Beispiel #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*/"]))
Beispiel #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*/"]))
Beispiel #4
0
 def test_multiple_lines_empty(self):
     self.assertEqual(["", "", "", ""],
                      java_thing(["hello", "world", "this /", "is a test"]))
Beispiel #5
0
 def test_multiple_lines_with_content(self):
     self.assertEqual(["", "/* world", "this /", "is a test*/"],
                      java_thing(
                          ["hello", "/* world", "this /", "is a test*/"]))
Beispiel #6
0
 def test_two_comments_one_line(self):
     self.assertEqual(["/*hello*//*hello*/"],
                      java_thing(["/*hello*/ some code /*hello*/"]))
Beispiel #7
0
 def test_two_comments_one_line_with_strings(self):
     self.assertEqual([""], java_thing(["'/*hello*/ some code /*hello*/"]))
Beispiel #8
0
 def test_multi_line_single_line_complex(self):
     self.assertEqual(["/*hello*/"],
                      java_thing(["asdfasdf/*hello*/asdfsdaasdf*/"]))
Beispiel #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*/"]))
Beispiel #10
0
 def test_basic_with_strings2(self):
     self.assertEqual(["//cats"], java_thing(["'//hello'//cats"]))
Beispiel #11
0
 def test_basic_with_strings(self):
     self.assertEqual([""], java_thing(["'//hello"]))
Beispiel #12
0
 def test_basic2(self):
     self.assertEqual(["//hello"], java_thing(["asdf//hello"]))