pcg-cpp icon indicating copy to clipboard operation
pcg-cpp copied to clipboard

Dead and untested code

Open o11c opened this issue 7 years ago • 0 comments

Things I noticed by hand:

  • struct rxs_mixin has its function called output_rxs rather than just plain output, which would prevent it from being used as an output_mixin if it were ever used.
  • may_tock is always false in the testsuite, so those branches aren't tested.
  • A bunch of x ? expr : 0 where x can never be 0. Since the expression is usually a shift, it should probably be a safe_shift function though.
  • operator- on extended generators after a step that can't be represented in a single itype.

Things I noticed missing from my port's coverage report:

  • Half of pcg_engine is ever tested (noticed because all the template-typedefs have to be functions in python)
  • both overloads of extended.advance_table, both methods ininsideout, all unoutput functions, and unxorshift are never tested.
  • unique_stream.stream() and oneseq_stream.stream() Probably should be covered by operator ==.
  • engine.wrapped
  • engine.operator == and extended.operator ==
  • rxs_mixin, rxs_m_mixin, xsh_mixin, xsl_mixin
  • extended.set
  • extended.advance in the forward direction. Probably applies to engine too ... and won't discard malfunction?

Some of these may be used in the samples, but those aren't run as part of the test suite, so can't be demonstrated to work.

o11c avatar Oct 05 '17 21:10 o11c