Changeset 2315 for cobra/trunk/Source/TestifyRunner.cobra
- Timestamp:
- 03/12/10 09:25:11 (2 years ago)
- Files:
-
- 1 modified
-
cobra/trunk/Source/TestifyRunner.cobra (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/TestifyRunner.cobra
r2252 r2315 419 419 index = firstLine.indexOf('.warning.') 420 420 warning = firstLine.substring(index+9).trim.toLower 421 return _testifyHeadWarning(warning, compilerVerbosity, fileNames, options, verbose) 421 return _testifyHeadWarning(warning, false, compilerVerbosity, fileNames, options, verbose) 422 423 if firstLineInsensitive.startsWith('#.warning-lax.') 424 # deprecated: put warnings on the lines where they occur. the "hasInlineMessages" code above will detect them. 425 index = firstLine.indexOf('.warning-lax.') 426 warning = firstLine.substring(index+13).trim.toLower 427 return _testifyHeadWarning(warning, true, compilerVerbosity, fileNames, options, verbose) 422 428 423 429 return _testifyStd(compilerVerbosity, fileNames, options, verbose) … … 509 515 return 0 510 516 511 if firstLineInsensitive.startsWith('#.error.') or firstLineInsensitive.startsWith('#.warning.') 517 if firstLineInsensitive.startsWith('#.error.') or firstLineInsensitive.startsWith('#.warning.') or firstLineInsensitive.startsWith('#.warning-lax.') 512 518 # these are handled below 513 519 break … … 639 645 return 1 640 646 641 def _testifyHeadWarning(warning as String, compilerVerbosity as int, fileNames as IList<of String>,647 def _testifyHeadWarning(warning as String, lax as bool, compilerVerbosity as int, fileNames as IList<of String>, 642 648 options as OptionValues, verbose as bool) as int 643 649 # TODO: the following code both checks for warnings to be thrown as well as going through a list of warnings. Seems like it should just need to do one or the other. … … 646 652 c.testifyFilesNamed(fileNames, options, _resultsWriter to !, verbose) 647 653 catch StopCompilation 648 print 'Expecting warning substring: "[warning]"' 649 print 'But got errors.' 650 .failed 651 return 0 654 if not lax 655 print 'Expecting warning substring: "[warning]"' 656 print 'But got errors.' 657 .failed 658 return 0 652 659 catch exc as Exception 653 660 print 'Internal exception: [exc]'



