コード例 #1
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testJavaMultiLineCommentsFileCount(self):
     f = open('../asantoro/multilinecomments.java')
     javaFile = f.read()
     testaroo = CountLines()
     lineCount = testaroo.numberOfLines(javaFile)
     assert lineCount == 4
     pass
コード例 #2
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testJavaThreeLinesAndCommentFileCount(self):
     f = open('../asantoro/threelinesandcomment.java')
     javaFile = f.read()
     testaroo = CountLines()
     lineCount = testaroo.numberOfLines(javaFile)
     assert lineCount == 3
     pass
コード例 #3
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testJavaEmptyBracesFileCount(self):
     f = open('../asantoro/emptybraces.java')
     javaFile = f.read()
     testaroo = CountLines()
     lineCount = testaroo.numberOfLines(javaFile)
     assert lineCount == 4
     pass
コード例 #4
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testJavaHasBlankSpaceFileCount(self):
     f = open('../asantoro/hasblankspace.java')
     javaFile = f.read()
     testaroo = CountLines()
     lineCount = testaroo.numberOfLines(javaFile)
     assert lineCount == 3
     pass
コード例 #5
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testJavaFileForLineCount(self):
     f = open('../asantoro/fourlinefile.java')
     javaFile = f.read()
     testaroo = CountLines()
     lineCount = testaroo.numberOfLines(javaFile)
     assert lineCount == 4
     pass
コード例 #6
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testStripOutEmptyLines(self):
     testaroo = CountLines()
     newString = testaroo.stripOutBlankLines('test\r  \t  \na')
     assert newString == 'test\na'
     pass
コード例 #7
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testEndLineComments(self):
     testaroo = CountLines()
     newString = testaroo.stripOutLineComments('This is a //test of the JavaScript RegExp object')
     assert newString == 'This is a '
     pass
コード例 #8
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testMultipleNestedMultiLine(self):
     testaroo = CountLines()
     newString = testaroo.strippedMultiLineComments('This is a /*t\ne/*s*/\n/*t*/\n*/ of the Java/*Script*/ RegExp object')
     assert newString == 'This is a \n of the Java RegExp object'
     pass
コード例 #9
0
ファイル: testcountlines.py プロジェクト: DTDojo/DTDojo
 def testNestedSingleLine(self):
     testaroo = CountLines()
     newString = testaroo.strippedMultiLineComments('Test a st/*hi*/ri/*blah*/ng lik/*blahblah*/e this')
     assert newString == 'Test a string like this'
     pass