funit 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +7 -2
- data/README.txt +1 -1
- data/Rakefile +5 -3
- data/bin/funit +5 -7
- data/lib/funit.rb +2 -4
- data/lib/funit/assertions.rb +3 -3
- metadata +6 -6
    
        data/History.txt
    CHANGED
    
    | @@ -1,9 +1,14 @@ | |
| 1 | 
            -
            === 0.9. | 
| 1 | 
            +
            === 0.9.2 / 2007-09-21
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            * 1 minor enhancement
         | 
| 4 | 
            +
              * broke up long generated assert lines with continuations to compile via g95
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            === 0.9.1 / 2007-08-20
         | 
| 2 7 |  | 
| 3 8 | 
             
            * 1 minor enhancement
         | 
| 4 9 | 
             
              * Stripped './' path prefixes and '\' continuations to appease windoze
         | 
| 5 10 |  | 
| 6 | 
            -
            === 0.9.0 /  | 
| 11 | 
            +
            === 0.9.0 / 2007-07-26
         | 
| 7 12 |  | 
| 8 13 | 
             
            * 1 minor enhancement
         | 
| 9 14 | 
             
              * Extracted fortran dependency engine -- see fortran gem.
         | 
    
        data/README.txt
    CHANGED
    
    
    
        data/Rakefile
    CHANGED
    
    | @@ -7,15 +7,17 @@ $:.unshift File.join( File.dirname(__FILE__), 'lib' ) | |
| 7 7 | 
             
            require 'funit'
         | 
| 8 8 |  | 
| 9 9 | 
             
            Hoe.new('funit', Funit::VERSION) do |p|
         | 
| 10 | 
            -
              p.rubyforge_name | 
| 10 | 
            +
              p.rubyforge_name  = 'nasarb'
         | 
| 11 | 
            +
              p.remote_rdoc_dir = 'funit' 
         | 
| 11 12 | 
             
              p.extra_deps << [ 'fortran', '>= 1.0.1' ]
         | 
| 12 13 | 
             
              p.author = ['Karen Bibb','Bil Kleb','Beth Lee-Rausch','Mike Park','Bill Wood']
         | 
| 13 14 | 
             
              p.email = 'funit-support@rubyforge.org'
         | 
| 14 | 
            -
              p.summary = ' | 
| 15 | 
            -
              p.description = p.paragraphs_of('README.txt',  | 
| 15 | 
            +
              p.summary = p.paragraphs_of('README.txt',3).to_s
         | 
| 16 | 
            +
              p.description = p.paragraphs_of('README.txt', 4..6).join("\n\n")
         | 
| 16 17 | 
             
              p.url = p.paragraphs_of('README.txt', 1).first.gsub(/^\* /, '').split(/\n/)
         | 
| 17 18 | 
             
              p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
         | 
| 18 19 | 
             
              p.clean_globs.concat %w( **/*_fun.f90 examples/**/TestRunner* **/*.o **/*.mod **/*.MOD )
         | 
| 20 | 
            +
              p.rsync_args = '-rpv --delete' # to preserve group permissions 
         | 
| 19 21 | 
             
            end
         | 
| 20 22 |  | 
| 21 23 | 
             
            # vim: syntax=Ruby
         | 
    
        data/bin/funit
    CHANGED
    
    | @@ -1,11 +1,9 @@ | |
| 1 1 | 
             
            # Main fUnit routine
         | 
| 2 2 |  | 
| 3 | 
            -
            begin
         | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
              require 'funit'
         | 
| 8 | 
            -
            end
         | 
| 3 | 
            +
            begin require 'rubygems'; rescue LoadError; end
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            $:.push "#{File.dirname $0}/../lib"
         | 
| 6 | 
            +
            require 'funit'
         | 
| 9 7 |  | 
| 10 8 | 
             
            include Funit
         | 
| 11 9 |  | 
| @@ -19,4 +17,4 @@ Funit::run_tests | |
| 19 17 | 
             
            #
         | 
| 20 18 | 
             
            # This file is governed by the NASA Open Source Agreement.
         | 
| 21 19 | 
             
            # See License.txt for details.
         | 
| 22 | 
            -
            #++
         | 
| 20 | 
            +
            #++
         | 
    
        data/lib/funit.rb
    CHANGED
    
    | @@ -1,18 +1,16 @@ | |
| 1 | 
            +
            require 'fortran'
         | 
| 1 2 |  | 
| 2 3 | 
             
            require 'funit/compiler'
         | 
| 3 4 | 
             
            require 'funit/functions'
         | 
| 4 5 | 
             
            require 'funit/assertions'
         | 
| 5 6 | 
             
            require 'funit/testsuite'
         | 
| 6 7 |  | 
| 7 | 
            -
            require 'rubygems'
         | 
| 8 | 
            -
            require 'fortran'
         | 
| 9 | 
            -
             | 
| 10 8 | 
             
            module Funit
         | 
| 11 9 |  | 
| 12 10 | 
             
              ##
         | 
| 13 11 | 
             
              # the version of this fUnit
         | 
| 14 12 |  | 
| 15 | 
            -
              VERSION = '0.9. | 
| 13 | 
            +
              VERSION = '0.9.2'
         | 
| 16 14 |  | 
| 17 15 | 
             
              ##
         | 
| 18 16 | 
             
              # run all tests
         | 
    
        data/lib/funit/assertions.rb
    CHANGED
    
    | @@ -30,7 +30,7 @@ module Funit | |
| 30 30 | 
             
                  expected, actual = *(get_args($1))
         | 
| 31 31 | 
             
                  @type = 'IsRealEqual'
         | 
| 32 32 | 
             
                  @condition = ".not.(#{expected}+2*spacing(real(#{expected})).ge.#{actual} &\n             .and.#{expected}-2*spacing(real(#{expected})).le.#{actual})"
         | 
| 33 | 
            -
                  @message = "\"#{actual} (\",#{actual},\") is not\" | 
| 33 | 
            +
                  @message = "\"#{actual} (\",#{actual},\") is not\", &\n #{expected},\"within\",2*spacing(real(#{expected}))"
         | 
| 34 34 | 
             
                  syntax_error("invalid body for #@type",@suite_name) unless $&
         | 
| 35 35 | 
             
                  write_assert
         | 
| 36 36 | 
             
                end
         | 
| @@ -40,7 +40,7 @@ module Funit | |
| 40 40 | 
             
                  expected, actual, tolerance = *(get_args($1))
         | 
| 41 41 | 
             
                  @type = 'IsEqualWithin'
         | 
| 42 42 | 
             
                  @condition = ".not.(#{actual}+#{tolerance}.ge.#{expected} &\n             .and.#{actual}-#{tolerance}.le.#{expected})"
         | 
| 43 | 
            -
                  @message = "\"#{expected} (\",#{expected},\") is not\" | 
| 43 | 
            +
                  @message = "\"#{expected} (\",#{expected},\") is not\", &\n #{actual},\"within\",#{tolerance}"
         | 
| 44 44 | 
             
                  syntax_error("invalid body for #@type",@suite_name) unless $&
         | 
| 45 45 | 
             
                  write_assert
         | 
| 46 46 | 
             
                end
         | 
| @@ -111,4 +111,4 @@ end | |
| 111 111 | 
             
            #
         | 
| 112 112 | 
             
            # This file is governed by the NASA Open Source Agreement.
         | 
| 113 113 | 
             
            # See License.txt for details.
         | 
| 114 | 
            -
            #++
         | 
| 114 | 
            +
            #++
         | 
    
        metadata
    CHANGED
    
    | @@ -3,15 +3,15 @@ rubygems_version: 0.9.4 | |
| 3 3 | 
             
            specification_version: 1
         | 
| 4 4 | 
             
            name: funit
         | 
| 5 5 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 6 | 
            -
              version: 0.9. | 
| 7 | 
            -
            date: 2007- | 
| 8 | 
            -
            summary:  | 
| 6 | 
            +
              version: 0.9.2
         | 
| 7 | 
            +
            date: 2007-09-21 00:00:00 -04:00
         | 
| 8 | 
            +
            summary: FUnit is a unit testing framework for Fortran modules.
         | 
| 9 9 | 
             
            require_paths: 
         | 
| 10 10 | 
             
            - lib
         | 
| 11 11 | 
             
            email: funit-support@rubyforge.org
         | 
| 12 12 | 
             
            homepage: http://rubyforge.org/projects/funit
         | 
| 13 13 | 
             
            rubyforge_project: nasarb
         | 
| 14 | 
            -
            description:  | 
| 14 | 
            +
            description: Unit tests are written as Fortran fragments that use a small set of testing-specific keywords and functions.  FUnit transforms these fragments into valid Fortran code, compiles, links, and runs them against the module under test.  FUnit is {opinionated software}[http://www.oreillynet.com/pub/a/network/2005/08/30/ruby-rails-david-heinemeier-hansson.html], which values convention over configuration. Specifically, FUnit,  * requires a Fortran 95 compiler, * only supports testing routines contained in modules, * requires tests to be stored along side the code under test, and * requires test files to be named appropriately.
         | 
| 15 15 | 
             
            autorequire: 
         | 
| 16 16 | 
             
            default_executable: 
         | 
| 17 17 | 
             
            bindir: bin
         | 
| @@ -60,9 +60,9 @@ files: | |
| 60 60 | 
             
            - utils/funit-mode.el
         | 
| 61 61 | 
             
            test_files: 
         | 
| 62 62 | 
             
            - test/test_compiler.rb
         | 
| 63 | 
            -
            - test/test_functions.rb
         | 
| 64 | 
            -
            - test/test_funit.rb
         | 
| 65 63 | 
             
            - test/test_testsuite.rb
         | 
| 64 | 
            +
            - test/test_funit.rb
         | 
| 65 | 
            +
            - test/test_functions.rb
         | 
| 66 66 | 
             
            rdoc_options: 
         | 
| 67 67 | 
             
            - --main
         | 
| 68 68 | 
             
            - README.txt
         |