Skip to content

Consider changing UnitTest::Check signature to take value by const reference. #7

Closed

Description

@pjohnmeyer

From https://sourceforge.net/tracker/?func=detail&aid=2604261&group_id=158151&atid=806684

As of v.1.4, UnitTest::Check() takes a value by copy, however, due to copy constructors, calling this function can have side effects. I feel it is preferable to pass the value by reference, e.g.

template <typename Value>
Check (Value const& value) {
return !!value;
}

This appears to be an inconsistency with the changes from r178 on sourceforge.

Activity

  1. self-assigned this
    on Aug 17, 2016
  2. added this to the 2.0.0 milestone on Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions