Wiki

Ticket #181: ert-cleanup-intfiles.patch

File ert-cleanup-intfiles.patch, 2.3 KB (added by hopscc, 15 years ago)
  • Source/Compiler.cobra

     
    887887    def _exitFromErrors 
    888888        require .errors.count 
    889889        .printMessages 
     890        _deleteIntermediateFiles 
    890891        throw StopCompilation(this) 
    891892 
    892893    def printMessages 
  • Tests/700-command-line/871-ert.cobra

     
     1# .skip. 
     2# compiled by 870-ert-intfiles and is expected to fail compilation 
     3class X 
     4    var y=z 
     5    def main is shared 
     6        pass 
  • Tests/700-command-line/870-ert-intfiles.cobra

     
     1# check that a failed compile with -ert doesnt leave any additional  
     2# Native_ert* files behind. ticket:181 
     3class Wert 
     4    def main is shared  
     5        file = '871-ert' 
     6        src  = '[file].cobra' 
     7        exe  = '[file].exe' 
     8         
     9        cobraPath = CobraCore.findCobraExe to ! 
     10        p as System.Diagnostics.Process? 
     11        # chk no files 'Native_ert*.cs' in cwd 
     12        ertCount = .getNativeIntermediateFiles.count 
     13        assert ertCount == 0 
     14        output = CobraCore.runCobraExe(cobraPath, '-c -ert [src]', out p) 
     15        assert 'error: Cannot find "z".' in output 
     16        assert p.exitCode <> 0 and not File.exists(exe) 
     17        assert .getNativeIntermediateFiles.count == ertCount 
     18     
     19    def getNativeIntermediateFiles as IList<of String> is shared 
     20        allfiles = Directory.getFiles('.') 
     21        ertfiles = for f in allfiles where f.startsWith(r'.\Native_ert') get f[2:] 
     22        return ertfiles 
  • Developer/IntermediateReleaseNotes.text

     
    392392* Fixed: Cobra gives an inscrutable error message for numeric for-loops that have incompatible numeric types. ticket:165 
    393393 
    394394* Fixed: Improper codegen for static constructors. ticket:169 
     395 
     396* Fixed: Non removal of Intermediate file if -ert specified and compilation fails. ticket:181