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

Support naked expected_failure in tests #22

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

jcivlin
Copy link

@jcivlin jcivlin commented Apr 19, 2024

Adding a missing case in processing of expected_failure with no error code.
Example:

    #[test]
    #[expected_failure]
    fun size_limit_fail() {
        let v = V::empty();
        let i = 0;
        // Limit is currently 1024 * 1024
        let max_len = 1024 * 1024 + 1;

        while (i < max_len) {
            V::push_back(&mut v, i);
            i = i + 1;
        };
    }

This fixes tests:

  • size_limit_fail in vector_tests,
  • timeout_fail_with_expected_failure in move_unit_test.

@jcivlin jcivlin marked this pull request as ready for review April 19, 2024 09:18
@jcivlin jcivlin requested review from brson and ksolana April 19, 2024 09:18
@jcivlin jcivlin merged commit f923b0b into anza-xyz:solana Apr 19, 2024
12 checks passed
ksolana pushed a commit to ksolana/sui that referenced this pull request Jun 14, 2024
* 041924-naked-expected_failure: ini

* 041924-naked-expected_failure: test

* 041924-naked-expected_failure: expected result update
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.

None yet

2 participants