You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds in-language tests for all all storage types, except for StorageKey and StorageVec, which are added in #7614.
Existing SDK harness tests that were testing the same functionality are deleted. This is aligned with the decision to migrate SDK harness tests to in-language tests and and at the same time strengthen the test coverage.
Checklist
I have linked to any relevant issues.
I have commented my code, particularly in hard-to-understand areas.
I have updated the documentation where relevant (API docs, the reference, and the Sway book).
Medium Risk
Moderate risk because it replaces large SDK-harness coverage with new in-language tests; failures could reduce CI signal if the new tests don’t fully match prior edge cases across dynamic vs legacy storage modes.
Overview
Adds new in-language contract test programs for StorageBytes, StorageString, and StorageMap, exercising write_slice/read_slice, len, overwrites, and clear vs clear_existed behavior under both experimental_dynamic_storage modes (including slot-boundary-sized inputs).
Reworks test_types to implement Hash for several custom enums/structs (and RawPtrNewtype) so they can be used as StorageMap keys/values in the new generic test matrix, and renames the new test projects accordingly.
Removes the corresponding SDK harness projects and Rust integration tests (storage_bytes, storage_map, storage_string) from the harness workspace/modules and lockfile, shifting coverage to forc test-driven in-language tests.
Reviewed by Cursor Bugbot for commit 19e8fbb. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds in-language tests for all all storage types, except for
StorageKeyandStorageVec, which are added in #7614.Existing SDK harness tests that were testing the same functionality are deleted. This is aligned with the decision to migrate SDK harness tests to in-language tests and and at the same time strengthen the test coverage.
Checklist
Breaking*orNew Featurelabels where relevant.