Commit graph

17 commits

Author SHA1 Message Date
Markus Schirp
bb9809fa39 Reorganize unit specs.
* The old nameing did not make any sense. Sorry for not useing git mv.
2012-08-01 14:13:57 +02:00
Markus Schirp
fb7bb942a3 Add mutation of simple send without arguments
* Lets the block spec work again as 1.8 and 1.9 mode do not behave
  differend as with literals.
2012-08-01 13:53:28 +02:00
Markus Schirp
d58ed0e81b Bring back yard coverage to 100% 2012-08-01 13:31:56 +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
55c61dfc28 Add initial support for Rubinius::AST::{Send,SendWithArguments}
* Only supports simple mutations currently.
2012-07-31 22:20:12 +02:00
Markus Schirp
9c08fad7ea Add noop mutator for Rubinius::AST::Self 2012-07-31 22:03:36 +02:00
Markus Schirp
7f3797ffa1 Introduce Mutant::Random
* Cleans up naming duplication from the Mutant.random_* names.
2012-07-31 20:11:37 +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
02a726d767 Retry on random mutates that are the same
* This fixes problems where generated mutations have a chance
  to be the same like the mutation subject.
2012-07-30 22:18:00 +02:00
Markus Schirp
2b7e9c60c2 Simpify equal ast mutation with predicate. 2012-07-30 21:56:25 +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
27f43eef35 Mutate float literals also to negative infinity
* Also fixes invalid naming of support methods in literal float mutator.
2012-07-29 18:08:29 +02:00
Markus Schirp
0b9b46d12f Add range literal support
* Full of duplication. Will be addressed when all literals are done.
2012-07-28 00:17:00 +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