Commit graph

24 commits

Author SHA1 Message Date
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
993f08d975 Remove explict argument to to_enum in method matcher 2012-07-29 22:44:53 +02:00
Markus Schirp
e6c6c8e5fd Remove unneeded explict self receiver 2012-07-29 22:29:24 +02:00
Markus Schirp
564220c453 Correct name of Mutant.random_float 2012-07-29 22:28:30 +02:00
Markus Schirp
d0524f1724 Cleanup Mutant::Method::Classifier
* Use constants instead of magic numbers
* Use regexp literal. Dunno why it was not used.
* Freeze constants
2012-07-29 21:48:20 +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
a3b9419494 Do not pass method name to to_enum calls within #each 2012-07-29 18:03:44 +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
a8e635d77a Simplify code loading steps and set default file 2012-07-27 13:32:57 +02:00
Markus Schirp
96a73e5448 Do not create a Block node where not needed 2012-07-27 13:18:48 +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
ffceb9d81d Rename method in classifier to be more explict 2012-07-23 23:02:00 +02:00
Markus Schirp
3caf012eb9 Remove dead code 2012-07-23 23:01:04 +02:00
Markus Schirp
dd34e29ce9 Cleanup classifier method nameing and placement 2012-07-23 22:57:42 +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