Skip to content

Conversation

@giladchase
Copy link
Contributor

@giladchase giladchase commented Nov 18, 2025

Folded into prev level

@reviewable-StarkWare
Copy link

This change is Reviewable

@giladchase giladchase marked this pull request as ready for review November 18, 2025 13:34
Copy link
Contributor Author

giladchase commented Nov 18, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orizi reviewed 1 of 2 files at r1, all commit messages.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @TomerStarkware)


corelib/src/test/language_features/box_test.cairo line 4 at r1 (raw file):

#[inline(never)]
pub fn into_box<T>(value: T) -> Box<T> {

doc


corelib/src/test/language_features/box_test.cairo line 45 at r1 (raw file):

    let boxed_b = into_box(TestEnum::B(1));
    assert_eq!(boxed_b.unbox(), TestEnum::B(1));
}

Suggestion:

#[test]
fn test_local_into_box() {
    assert_eq!(into_box((1, 2_u256, 3)).unbox(), (1, 2, 3));
    assert_eq!(into_box(()).unbox(), ());
    assert_eq!(into_box(Some(6_u8)).unbox(), Some(6));
    assert_eq!(into_box(None::<u8>).unbox(), None);
    assert_eq!(into_box(Ok::<u16, u256>(7)).unbox(), Ok(7));
    assert_eq!(into_box(Err::<u16, u256>(8)).unbox(), Err(8));
}

@giladchase giladchase force-pushed the gilad/11-18-add_box_tests_for_local_into_box branch from c17df4c to c62d60d Compare November 19, 2025 11:43
@giladchase giladchase force-pushed the gilad/11-17-feat_optimize_t_to_use_fp_offset_instead_of_box_alloc branch from f770888 to e2ff4a7 Compare November 19, 2025 11:43
Copy link
Contributor Author

@giladchase giladchase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @orizi and @TomerStarkware)


corelib/src/test/language_features/box_test.cairo line 4 at r1 (raw file):

Previously, orizi wrote…

doc

Done.


corelib/src/test/language_features/box_test.cairo line 45 at r1 (raw file):

    let boxed_b = into_box(TestEnum::B(1));
    assert_eq!(boxed_b.unbox(), TestEnum::B(1));
}

Done.

@giladchase giladchase force-pushed the gilad/11-17-feat_optimize_t_to_use_fp_offset_instead_of_box_alloc branch from e2ff4a7 to ddc96e1 Compare November 19, 2025 11:56
@giladchase giladchase force-pushed the gilad/11-18-add_box_tests_for_local_into_box branch from c62d60d to 4693664 Compare November 19, 2025 11:56
@giladchase giladchase force-pushed the gilad/11-17-feat_optimize_t_to_use_fp_offset_instead_of_box_alloc branch from ddc96e1 to 847c438 Compare November 19, 2025 12:09
@giladchase giladchase force-pushed the gilad/11-18-add_box_tests_for_local_into_box branch from 4693664 to 3f4d687 Compare November 19, 2025 12:09
@giladchase giladchase changed the base branch from gilad/11-17-feat_optimize_t_to_use_fp_offset_instead_of_box_alloc to graphite-base/8695 November 19, 2025 12:35
@giladchase giladchase closed this Nov 19, 2025
@orizi orizi deleted the gilad/11-18-add_box_tests_for_local_into_box branch November 20, 2025 10:37
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.

4 participants