|
17 | 17 | //! ## Quick Start |
18 | 18 | //! |
19 | 19 | //! ```rust,no_run |
20 | | -//! use testsvm::TestSVM; |
21 | | -//! use solana_sdk::pubkey::Pubkey; |
22 | | -//! use solana_sdk::transaction::Transaction; |
23 | | -//! use solana_sdk::signature::Signer; |
24 | | -//! # use anyhow::Result; |
| 20 | +//! use testsvm::prelude::*; |
25 | 21 | //! # fn main() -> Result<()> { |
26 | 22 | //! |
27 | 23 | //! // Create a new test environment |
|
56 | 52 | //! ## Working with Programs |
57 | 53 | //! |
58 | 54 | //! ```rust,no_run |
59 | | -//! use testsvm::TestSVM; |
| 55 | +//! use testsvm::prelude::*; |
60 | 56 | //! use solana_sdk::pubkey::Pubkey; |
61 | 57 | //! # use anyhow::Result; |
62 | 58 | //! # fn main() -> Result<()> { |
|
81 | 77 | //! ## Account Management |
82 | 78 | //! |
83 | 79 | //! ```rust |
84 | | -//! use testsvm::{TestSVM, AccountRef, TestSVMSPLHelpers}; |
85 | | -//! use solana_sdk::signature::Signer; |
86 | | -//! # use anyhow::Result; |
| 80 | +//! use testsvm::prelude::*; |
87 | 81 | //! # fn main() -> Result<()> { |
88 | 82 | //! |
89 | 83 | //! let mut env = TestSVM::init()?; |
|
108 | 102 | //! ## Transaction Building and Execution |
109 | 103 | //! |
110 | 104 | //! ```rust |
111 | | -//! use testsvm::{TestSVM, TXResultAssertions}; |
112 | | -//! use solana_sdk::transaction::Transaction; |
113 | | -//! use solana_sdk::signature::Signer; |
114 | | -//! # use anyhow::Result; |
| 105 | +//! use testsvm::prelude::*; |
115 | 106 | //! # fn main() -> Result<()> { |
116 | 107 | //! |
117 | 108 | //! let mut env = TestSVM::init()?; |
|
142 | 133 | //! ## Debugging and Analysis |
143 | 134 | //! |
144 | 135 | //! ```rust |
145 | | -//! use testsvm::TestSVM; |
146 | | -//! use solana_sdk::transaction::Transaction; |
147 | | -//! # use anyhow::Result; |
| 136 | +//! use testsvm::prelude::*; |
148 | 137 | //! # fn main() -> Result<()> { |
149 | 138 | //! |
150 | 139 | //! let mut env = TestSVM::init()?; |
|
178 | 167 | //! ## Integration with Anchor |
179 | 168 | //! |
180 | 169 | //! ```rust,no_run |
181 | | -//! use testsvm::{TestSVM, TXResultAssertions}; |
182 | | -//! use anchor_lang::prelude::*; |
183 | | -//! use testsvm::anchor_instruction; |
184 | | -//! # use anyhow::Result; |
| 170 | +//! use testsvm::prelude::*; |
185 | 171 | //! |
186 | 172 | //! // Example program module (would be generated by Anchor) |
187 | 173 | //! // declare_program!(my_program) would generate something similar to: |
188 | | -//! # use anchor_lang::prelude::*; |
189 | | -//! # use solana_sdk::pubkey::Pubkey; |
190 | 174 | //! # pub mod my_program { |
191 | 175 | //! # use solana_sdk::pubkey::Pubkey; |
192 | 176 | //! # pub const ID: Pubkey = Pubkey::new_from_array([0; 32]); |
@@ -237,6 +221,6 @@ pub mod prelude; |
237 | 221 | // Re-export from other crates |
238 | 222 | pub use ::anchor_utils::*; |
239 | 223 | pub use ::solana_address_book::*; |
240 | | -pub use testsvm_assertions::*; |
241 | | -pub use testsvm_core::*; |
242 | | -pub use testsvm_spl::*; |
| 224 | +pub use testsvm_assertions; |
| 225 | +pub use testsvm_core; |
| 226 | +pub use testsvm_spl; |
0 commit comments