Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per Issue #101, #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jackdigitalinsight
Copy link

reset return sequence index when setting a return sequence.

Thank you for your contribution.

Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • You are not breaking consistency
  • You have added unit tests
  • All tests and other checks pass

I don't have CMake 3.20 to run buildandtest, but here's a suggested addition to test/src/test_cases.include. Should fail with original code and work with update.

TEST_F(FFFTestSuite, return_value_sequence_update)
{
    long myReturnVals[] = { 3, 7 };
    SET_RETURN_SEQ(longfunc0, myReturnVals, 2);
    ASSERT_EQ(myReturnVals[0], longfunc0());
    ASSERT_EQ(myReturnVals[1], longfunc0());
    long moreReturnVals[] = { 9, 11 };
    SET_RETURN_SEQ(longfunc0, moreReturnVals, 2);
    ASSERT_EQ(moreReturnVals[0], longfunc0());
    ASSERT_EQ(moreReturnVals[1], longfunc0());
}

reset return sequence index when setting a return sequence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant