Commit graph

18 commits

Author SHA1 Message Date
Markus Schirp
459d028de1 Add a working mutation tester for mutant
* Expand attr_reader :name, to def name; @name; end
  As attr_reader defined methods do not have a valid source location.
* Expose more internal state to allow the generation of nice match
  identifications. Needs to be cleaned up.
2012-08-20 17:53:41 +02:00
Markus Schirp
28bbf9af00 Remove use of root level namespace within the lib
This allows the easy creation of Zombie to mutate Mutant.
2012-08-16 22:59:25 +02:00
Markus Schirp
42e6fe84e5 Add runner with reporter
* Use MethodObject mixin
* Rename Context::Constant to Context::Scope
* Use Mutation class instead of passing around raw nodes
2012-08-16 04:10:54 +02:00
Markus Schirp
3e23c9258f Move emit body mutations to base class 2012-08-14 12:40:27 +02:00
Markus Schirp
23a04009ce Use abstract support gem instead of homebrew
The support gem is better speced than the homebrew version ever was.
2012-08-03 01:28:15 +02:00
Markus Schirp
72996901bb Use immutable support gem 2012-08-03 00:19:01 +02:00
Markus Schirp
cc811aecf5 Add support for mutating if statements
* Also some other minor cleanups
2012-08-01 15:55:49 +02:00
Markus Schirp
b9b95ebe94 Break up mutation spec in class specific files
* Also add mutation class registry to improve readability.
* Calling mutations are still broken.
2012-08-01 13:27:35 +02:00
Markus Schirp
f318a7a68e Use to_source and ice_nine
* Adding to_source only to gemspec
* Use ice_nine to deep freeze the deep_cloned nodes that are subject of
  mutation to prevent bad mutators having a side effect.
2012-07-31 22:01:55 +02:00
Markus Schirp
75e6a229f8 Create namespace for literal mutations
* Do not follow rubinius names anymore.
  An explict declaration now declares a mutator handles
  specific AST node.

* Has a nice impact on metrics.
2012-07-31 19:45:46 +02:00
Markus Schirp
d50ecc483d Cleanup missing whitespace after comma
* There must be a code metric tool helping me in converting my style.
2012-07-31 04:10:37 +02:00
Markus Schirp
3e1f9c408f Cleanup and dedup mutation generation
* Mutator and Generator where merged.
* A single pass over all duplications was made.
* It is clear a specific handles?(node) code for finding mutators
  is needed. Like virtus does for attributes, should also cache.
* Does not pass on 1.9 mode currently as blocks are unexpectly parsed
  differend when it comes to a series of literal booleans.
2012-07-31 04:00:05 +02:00
Markus Schirp
8995bc844e Bring back yard coverage to 100% 2012-07-30 22:42:39 +02:00
Markus Schirp
ef9172bca4 Guard against the generation of equal mutants
* Move Mutant::Mutator::Generator in a dedicated file
* Mutant::Mutator::Generator#append only forwards mutated node when it
  does not equal original nodes sexpession. This does not catch
  equivalent mutations, but mutations that exactly reproduce the same
  AST. This way a check for not generating the same asts can be
  centralized.
2012-07-30 21:40:49 +02:00
Markus Schirp
e6c6c8e5fd Remove unneeded explict self receiver 2012-07-29 22:29:24 +02:00
Markus Schirp
a3b9419494 Do not pass method name to to_enum calls within #each 2012-07-29 18:03:44 +02:00
Markus Schirp
9e8b451933 Add mutation for some literals
* This is in progress code. The plan is to support all literals before
  beginning to cleanup and dedup the mutation generation. Have to
  understand the AST and the possible mutations more in depth before
  making structural decisions here.
2012-07-27 22:39:31 +02:00
Markus Schirp
10c3dfc390 Finalize method matching
* Add tests for all edge cases I could create
* Add infrastructure for loading mutations into the vm.
* The fun part is next!
2012-07-26 19:25:23 +02:00