Commit graph

26 commits

Author SHA1 Message Date
Markus Schirp
cc811aecf5 Add support for mutating if statements
* Also some other minor cleanups
2012-08-01 15:55:49 +02:00
Markus Schirp
7ccbae8bd4 Add match all and match none mutations to regexp 2012-08-01 15:08:29 +02:00
Markus Schirp
414c572d03 Rename shared mutation examples 2012-08-01 14:58:24 +02:00
Markus Schirp
640ce5360e Correct mutations of send to self
* Invert the behaviour as this direction of mutation does make sense.
2012-08-01 14:54:49 +02:00
Markus Schirp
c168d33adc Simplify explict_self_reciver mutation 2012-08-01 14:38:12 +02:00
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
db96c0cfab Fix whitespace ater comma 2012-08-01 13:30:08 +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
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
9c1d9cfa58 Switch to rspec-2
* One of the main reasons behind mutant was to get a rid of rspec-1.3
  in my toolchain.
* Remove most of mri specific stuff from Gemfile.
* Remove of mri specific taks will happen later, will heckle locally
  with external rspec-1.3 + heckle setup.
* Mutant should be self hosting as fast as possible :P
2012-07-31 00:48:04 +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
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
Markus Schirp
69cda2fb14 Add first code loading integration spec
* The exact procedure of loading needs more
  care to be better understod.
* Fix problems found while loading.
2012-07-27 00:24:11 +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
Markus Schirp
dc893bfd7d Progress on method matching
* Adjust metrics
* Add initial integration spec on method matching
* Yard and Heckle coverage is at 100% (heckle cov is disputable)
* Rcov does not really make sense as MRI 1.8 cannot reach all code
  paths.
2012-07-24 01:41:08 +02:00
Markus Schirp
d74481b8fb Cleanup whitespace after comma 2012-07-23 23:03:55 +02:00
Markus Schirp
df6ccafeab Add method matcher infrastructure
Needs more specs for sure. Especially edge cases.
2012-07-23 22:54:35 +02:00
Markus Schirp
8c1fa8dace Add project infrastructure
* This infrastructure, especially the rake tasks should be
  gemified at some point in the future. I copied exactly the same
  bytes many times in the last month.
2012-07-23 16:37:44 +02:00