Permalink
Browse files

Prepping for release.

[git-p4: depot-paths = "//src/heckle/dev/": change = 2920]
  • Loading branch information...
1 parent fc240fc commit 106d5dbc0c59c8a7b3e10b442a2e4a59e9c56fb1 @zenspider zenspider committed Jan 16, 2007
Showing with 30 additions and 27 deletions.
  1. +9 −6 History.txt
  2. +21 −21 lib/heckle.rb
View
@@ -1,11 +1,14 @@
-== svn
-* 1 bug fix
- * Fixed the infinite loop caused by syntax errors
-* 1 minor enhancement
- * -b allows heckling of branches only
-* 2 major enhancement
+== 1.2.0 / 2007-01-15
+
+* 2 major enhancements:
* Timeout for tests set dynamically and overridable with -T
* Class method support with "self.method_name"
+* 3 minor enhancements:
+ * -b allows heckling of branches only
+ * Restructured class heirarchy and got rid of Base and others.
+ * Revamped the tests and reduced size by 60%.
+* 1 bug fix:
+ * Fixed the infinite loop caused by syntax errors
== 1.1.1 / 2006-12-20
View
@@ -10,7 +10,7 @@ def to_class
end
class Heckle < SexpProcessor
- VERSION = '1.1.2'
+ VERSION = '1.2.0'
MUTATABLE_NODES = [:if, :lit, :str, :true, :false, :while, :until]
WINDOZE = RUBY_PLATFORM =~ /mswin/
NULL_PATH = WINDOZE ? 'NUL:' : '/dev/null'
@@ -26,44 +26,44 @@ class Heckle < SexpProcessor
def self.debug=(value)
@@debug = value
end
-
+
def self.timeout=(value)
@@timeout = value
@@guess_timeout = false # We've set the timeout, don't guess
end
-
+
def self.guess_timeout?
@@guess_timeout
end
def initialize(klass_name=nil, method_name=nil, reporter = Reporter.new)
super()
-
+
@klass_name = klass_name
@method_name = method_name.intern if method_name
-
+
@klass = klass_name.to_class
-
+
@method = nil
@reporter = reporter
-
+
self.strict = false
self.auto_shift_type = true
self.expected = Array
-
+
@mutatees = Hash.new
@mutation_count = Hash.new
@node_count = Hash.new
@count = 0
-
+
MUTATABLE_NODES.each {|type| @mutatees[type] = [] }
-
+
@failures = []
-
+
@mutated = false
-
+
grab_mutatees
-
+
@original_tree = current_tree.deep_clone
@original_mutatees = mutatees.deep_clone
end
@@ -131,11 +131,11 @@ def heckle(exp)
raise e
end
@reporter.replacing(klass_name, method_name, src) if @@debug
-
+
clean_name = method_name.to_s.gsub(/self\./, '')
self.count += 1
new_name = "h#{count}_#{clean_name}"
-
+
klass = aliasing_class method_name
klass.send :remove_method, new_name rescue nil
klass.send :alias_method, new_name, clean_name
@@ -229,11 +229,11 @@ def mutate_until(node)
def mutate_node(node)
raise UnsupportedNodeError unless respond_to? "mutate_#{node.first}"
increment_node_count node
-
+
if should_heckle? node
increment_mutation_count node
return send("mutate_#{node.first}", node)
- else
+ else
node
end
end
@@ -270,12 +270,12 @@ def reset_tree
@mutated = false
self.count += 1
-
+
clean_name = method_name.to_s.gsub(/self\./, '')
new_name = "h#{count}_#{clean_name}"
-
+
klass = aliasing_class method_name
-
+
klass.send :undef_method, new_name rescue nil
klass.send :alias_method, new_name, clean_name
klass.send :alias_method, clean_name, "h1_#{clean_name}"
@@ -410,7 +410,7 @@ def warning(message)
puts "!" * 70
puts
end
-
+
def info(message)
puts
puts "*"*70

0 comments on commit 106d5db

Please sign in to comment.