Replace test-bridge with general-purpose macro exerciser#16
Open
Replace test-bridge with general-purpose macro exerciser#16
Conversation
Replace the EVM-flavored test-bridge contract with a domain-neutral test contract designed to exercise every #[contract] macro code path. - Rename tests/test-bridge to tests/test-contract - Replace types crate: Item/ItemId/Ownable instead of EVMAddress/ Deposit/WithdrawalId/PendingWithdrawal/OwnableUpgradeable - New contract: counter, label, items collection, Ownable + Versioned traits, custom data-driver, streaming feeds - Update contract-macro unit test fixtures to use my_crate:: paths - Test count preserved (17 contract + 32 schema + 1 ignored)
Replace all EVM-specific references (StandardBridge, Deposit, EVMAddress, etc.) with the generic test contract types (TestContract, Item, ItemId, CounterUpdated, etc.). Add trait exposure and associated function examples. Add reference parameter edge case.
- Set edition = "2024" and rust-version = "1.85" across all crates - Switch toolchain from nightly-2024-07-30 to stable
1c2ddf3 to
ed73d2c
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Replace the EVM-flavored
test-bridgecontract with a domain-neutral test contract designed to exercise every#[contract]macro code path. The old contract mirrored the StandardBridge from dusk-evm, coupling the test suite to EVM terminology that obscured what each test actually verified. The new contract uses generic types (Item,ItemId,Ownable,Versioned) where every method exists because it tests a specific macro feature, not because it mirrors a domain operation.Test contract rewrite:
tests/test-bridge/→tests/test-contract/Item/ItemId/Ownableinstead ofEVMAddress/Deposit/WithdrawalId/PendingWithdrawal/OwnableUpgradeableVersioned), custom data-driver encode/decodemy_crate::pathsdocs/design.mdexamples to use the new contractEdition 2024 migration:
edition = "2024"andrust-version = "1.85"across all cratesnightly-2024-07-30tostabledusk-coreanddusk-vmto 1.6 (git deps fromdusk-core-1.6.0tag) for stable-compatiblepiecrust-uplink#[unsafe(no_mangle)]in macro-generated code#![feature(let_chains)],-Z build-std, and edition2024-era version pinsHardFork::Aegisin test session for BLS V2 signature verificationtest_session