Commit graph

36 commits

Author SHA1 Message Date
Markus Schirp
8e6579ce4d Remove unused in-mutator mutation filter 2013-06-15 17:15:37 +02:00
Markus Schirp
90aa3589fa Port mutation generator infrastructure to parser 2013-06-14 21:11:54 +02:00
Markus Schirp
6747e636cd Fix syntax error in mutator 2013-06-14 21:11:54 +02:00
Markus Schirp
6b2e2a8bb0 Initial round of refactoring
* Remove some RBX only nodes
* Register parser types
* Remove all occurences of ::Rubinius when loading libraries
2013-06-14 21:11:54 +02:00
Markus Schirp
fce6d5c06e Metric diven cleanups and break large classes
* Formal argument mutations are still very dirty :(
2012-12-29 20:12:48 +01:00
Markus Schirp
3026572b50 Deduplicate util array and literal hash mutations 2012-12-29 16:53:52 +01:00
Markus Schirp
93556763dd Bring back yard coverage to 100%
Also do some minor refactorings
2012-12-12 22:31:27 +01:00
Markus Schirp
40d5230c68 Introduce noop mutation guards and argument mutators
* Sorry for not splitting up into smaller commit
2012-12-11 00:17:19 +01:00
Markus Schirp
de276327f5 Add support for mutating block arguments 2012-12-10 17:11:08 +01:00
Markus Schirp
69e9de95ed Extract node specific mutator base class 2012-12-06 21:30:28 +01:00
Markus Schirp
4a6954d53c Rename emit_elements to emit_body
* Reads a littebit better
* Nameing of methods in abstract Mutator base is still a mess
2012-12-06 20:14:01 +01:00
Markus Schirp
244dcfedbd Do not use Node#to_sexp to determine if random mutation was new
* #to_sexp is not stable and can crash under certain conditions
* to_source is not perfect also, but it does not crash currently ;)
2012-12-05 00:05:33 +01:00
Markus Schirp
98d5b6562c Use abstract_type gem from rubygems 2012-11-26 11:30:00 +01:00
Markus Schirp
637ea8a849 Use Adamantium::Flat from mbj/adamantium at configurable-freezers branch 2012-11-03 02:12:33 +01:00
Markus Schirp
ccbe2f6396 Mark failing specs as panding and use attr_reader again 2012-10-26 11:24:29 +02:00
Markus Schirp
9fcb271637 General source code beautifications 2012-10-19 23:34:19 +02:00
Markus Schirp
7ecf828768 User adamantium (former immutable) 2012-10-15 14:36:19 +02:00
Markus Schirp
3de69d832d Add cli stuff
* Currently broken (sorry) but do have to push to fix some nasty
  transitive dependency stuff (do not ask).
* Fix fix it tomorrow (hopefully I find the time)
2012-09-11 01:01:06 +02:00
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