Skip to content

Per Issue #101,#121

Open
jackdigitalinsight wants to merge 1 commit into
meekrosoft:masterfrom
jackdigitalinsight:set_return_seq-reset-index
Open

Per Issue #101,#121
jackdigitalinsight wants to merge 1 commit into
meekrosoft:masterfrom
jackdigitalinsight:set_return_seq-reset-index

Conversation

@jackdigitalinsight

Copy link
Copy Markdown

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