Sha256: 3b81c1aeacaa931bc7f0a8a243b30675f5a7d7eb15f36531579e2be779573f1d

Contents?: true

Size: 1017 Bytes

Versions: 10

Compression:

Stored size: 1017 Bytes

Contents

# These are methods to show warning and errors
# The code is nonsense it is used to make large complexity values.

class ExtraTests

  # CC 8
  def warn_method_cc8(a, b, c)
    q, r, s = nil
    if a
      q = a + c
    end
    if b
      b = r - q
    end
    if !c
      s = r + b
    end
    if b > q || c
      a = c + q
    end
    if a
      c = b
    end
    if c
      b = a
    end
    if s
      c = s + a
    end    
    # large token count 
    a + b + c + q + r + s + a + b + c + q + r + s + a + b + c + q + r + s + a + b + c + q + r + s
  end

  # CC 11
  def error_method_cc11(a, b, c)
    q, r, s = nil
    if a
      q = a + c
    end
    if b
      b = r - q
    end
    if !c
      s = r + b
    end
    if b > q || c
      a = c + q
    end
    if a
      c = b
    end
    if c
      b = a
    end
    if s
      c = s + a
    end
    if q
      r = s + q
    end
    if r
      s = a + r
    end    
    a + b + c + q + r + s + a + b + c + q + r + s
  rescue => err
    puts err
  end
    

end

Version data entries

10 entries across 10 versions & 6 rubygems

Version Path
metric_fu-Saikuro-1.1.1.0 tests/large_example.rb
japgolly-Saikuro-1.1.1.0 tests/large_example.rb
saikuro-1.2.1 examples/large_example.rb
saikuro-1.2.0 examples/large_example.rb
saikuro-1.1.1.1 examples/large_example.rb
atoulme-Saikuro-1.2.1 tests/large_example.rb
atoulme-Saikuro-1.1.2 tests/large_example.rb
atoulme-Saikuro-1.1.1 tests/large_example.rb
devver-Saikuro-1.2.0 tests/large_example.rb
Saikuro-1.1.0 tests/large_example.rb