mbj / mutant

Automated code reviews via mutation testing - semantic code coverage.
Other
1.95k stars 153 forks source link

Noop fail #13

Closed postmodern closed 11 years ago

postmodern commented 11 years ago
!!! Mutant alive: rspec:noop:Ronin::SQL::Emitter#emit_null:/vault/1/code/ronin/ronin-sql/lib/ronin/sql/emitter.rb:111:6eba2 !!!
def emit_null
  emit_keyword(:NULL)
end

Original code:

  def emit_null
    emit_keyword(:NULL)
  end
mbj commented 11 years ago

You are running with --debug / -d else you shold not see this printout?

Noop mutants (you can identify them from the rspec:noop identification) are unmodified nodes that are loaded into the VM.

Rationale: The specs must initially pass. Mutant loads the unmodified node prior to generating mutations. This makes sure to_source generated equivalent source that does NOT cause the specs to fail. Where in later evil mutations are generated the must fail the specs.

The printout for noop mutations with --debug is misleading. Already fixed in the development branch (do not try it, it is in the middle of a refactoring).

On Sun, Jan 20, 2013 at 11:14:19PM -0800, Postmodern wrote:

!!! Mutant alive: rspec:noop:Ronin::SQL::Emitter#emit_null:/vault/1/code/ronin/ronin-sql/lib/ronin/sql/emitter.rb:111:6eba2 !!!
def emit_null
  emit_keyword(:NULL)
end

Original code:

  def emit_null
    emit_keyword(:NULL)
  end

Reply to this email directly or view it on GitHub: https://github.com/mbj/mutant/issues/13

Markus Schirp

Phone: +49 201 / 360 379 14 Fax: +49 201 / 360 379 16 Web: www.seonic.net Email: mbj@seonic.net Twitter: twitter.com/_m_bj OS-Code: github.com/mbj

Seonic IT-Systems GbR Anton Shatalov & Markus Schirp Altendorferstrasse 44 D-45127 Essen

mbj commented 11 years ago

@postmodern Did you see this output with --debug? It is okay the noop mutation is alive. I'd like to close this issue as it shows indent behavior.

postmodern commented 11 years ago

Cannot reproduce now. Closing.