-
Notifications
You must be signed in to change notification settings - Fork 396
Add disclaimer to erc721 components #1638
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
Changes from all commits
b777992
4b49a6d
9bc0152
bbb549f
915ae5e
7406982
dc48248
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| source: src/tests/test_with_components.rs | ||
| expression: result | ||
| snapshot_kind: text | ||
| --- | ||
| TokenStream: | ||
|
|
||
| None | ||
|
|
||
| Diagnostics: | ||
|
|
||
| ==== | ||
| Error: ERC721Enumerable and ERC721Consecutive interfere with each other in token ownership tracking and should not be used together. | ||
| ==== | ||
|
|
||
| AuxData: | ||
|
|
||
| None |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,9 +59,17 @@ fn test_lower_lookup(checkpoints: Span<Checkpoint>) { | |
| for i in 1..checkpoints.len() { | ||
| let index: usize = i.try_into().unwrap(); | ||
| let checkpoint = *checkpoints.at(index); | ||
| let prev_checkpoint = *checkpoints.at(index - 1); | ||
| let search_key = checkpoint.key - 1; | ||
| let found_value = mock_trace.lower_lookup(search_key); | ||
| assert_eq!(found_value, checkpoint.value); | ||
| // If search_key equals the previous checkpoint's key, lower_lookup returns that value. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test was incorrectly assuming that checkpoint.key - 1 would always fall between checkpoints, but when the fuzzer generates consecutive keys (key_step = 1), search_key actually matches the previous checkpoint's key exactly, so lower_lookup correctly returns the previous checkpoint's value. |
||
| // Otherwise, it returns the current checkpoint's value (first with key >= search_key). | ||
| let expected = if search_key == prev_checkpoint.key { | ||
| prev_checkpoint.value | ||
| } else { | ||
| checkpoint.value | ||
| }; | ||
| assert_eq!(found_value, expected); | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.