Class Heckle
In: lib/heckle.rb
Parent: SexpProcessor

Test Unit Sadism

Methods

Classes and Modules

Class Heckle::Reporter
Class Heckle::Timeout

Constants

VERSION = '1.4.3'   The version of Heckle you are using.
BRANCH_NODES = [:if, :until, :while]   Branch node types.
WINDOZE = RUBY_PLATFORM =~ /mswin/   Is this platform MS Windows-like?
NULL_PATH = WINDOZE ? 'NUL:' : '/dev/null'   Path to the bit bucket.
DIFF = WINDOZE ? 'diff.exe' : 'diff'   diff(1) executable
MUTATABLE_NODES = instance_methods.grep(/mutate_/).sort.map do |meth| meth.sub(/mutate_/, '').intern   All nodes that can be mutated by Heckle.

Attributes

count  [RW]  Mutation count
failures  [RW]  Mutations that caused failures
klass  [RW]  Class being heckled
klass_name  [RW]  Name of class being heckled
method  [RW]  Method being heckled
method_name  [RW]  Name of method being heckled

Public Class methods

Creates a new Heckle that will heckle klass_name and method_name, sending results to reporter.

Public Instance methods

Convenience methods

Replaces the call node with nil.

mutate_cvasgn(node)

Alias for mutate_asgn

mutate_dasgn(node)

Alias for mutate_asgn

mutate_dasgn_curr(node)

Alias for mutate_asgn

Swaps for a :true node.

mutate_gasgn(node)

Alias for mutate_asgn

mutate_iasgn(node)

Alias for mutate_asgn

Swaps the then and else parts of the :if node.

mutate_lasgn(node)

Alias for mutate_asgn

Replaces the value of the :lit node with a random value.

Replaces the value of the :str node with a random value.

Swaps for a :false node.

Swaps for a :while node.

Swaps for a :until node.

Processing sexps

Returns a random Fixnum.

Returns a random Range

Returns a random String

Returns a random Symbol

Suppresses output on $stdout and $stderr.

Overwrite test_pass? for your own Heckle runner.

Running the script

[Validate]