@@ -34,7 +34,8 @@ fn program_test() -> ProgramTest {
34
34
pc
35
35
}
36
36
37
- fn get_account < T : Pack > (
37
+ /// Fetch and unpack account data
38
+ fn get_account_data < T : Pack > (
38
39
banks_client : & mut BanksClient ,
39
40
address : Pubkey ,
40
41
) -> impl Future < Output = std:: io:: Result < T > > + ' _ {
@@ -85,7 +86,7 @@ async fn test_basic() {
85
86
assert_eq ! ( feature_id_acccount. data. len( ) , Feature :: size_of( ) ) ;
86
87
87
88
// Confirm mint account state
88
- let mint = get_account :: < spl_token:: state:: Mint > ( & mut banks_client, mint_address)
89
+ let mint = get_account_data :: < spl_token:: state:: Mint > ( & mut banks_client, mint_address)
89
90
. await
90
91
. unwrap ( ) ;
91
92
assert_eq ! ( mint. supply, 42 ) ;
@@ -95,7 +96,7 @@ async fn test_basic() {
95
96
96
97
// Confirm delivery token account state
97
98
let delivery_token =
98
- get_account :: < spl_token:: state:: Account > ( & mut banks_client, delivery_token_address)
99
+ get_account_data :: < spl_token:: state:: Account > ( & mut banks_client, delivery_token_address)
99
100
. await
100
101
. unwrap ( ) ;
101
102
assert_eq ! ( delivery_token. amount, 42 ) ;
@@ -105,7 +106,7 @@ async fn test_basic() {
105
106
106
107
// Confirm acceptance token account state
107
108
let acceptance_token =
108
- get_account :: < spl_token:: state:: Account > ( & mut banks_client, acceptance_token_address)
109
+ get_account_data :: < spl_token:: state:: Account > ( & mut banks_client, acceptance_token_address)
109
110
. await
110
111
. unwrap ( ) ;
111
112
assert_eq ! ( acceptance_token. amount, 0 ) ;
@@ -131,7 +132,7 @@ async fn test_basic() {
131
132
assert_eq ! ( feature_id_acccount. owner, system_program:: id( ) ) ;
132
133
133
134
assert ! ( matches!(
134
- get_account :: <FeatureProposal >( & mut banks_client, feature_proposal. pubkey( ) ) . await ,
135
+ get_account_data :: <FeatureProposal >( & mut banks_client, feature_proposal. pubkey( ) ) . await ,
135
136
Ok ( FeatureProposal :: Pending ( _) )
136
137
) ) ;
137
138
@@ -175,7 +176,7 @@ async fn test_basic() {
175
176
176
177
// Confirm feature proposal account state
177
178
assert ! ( matches!(
178
- get_account :: <FeatureProposal >( & mut banks_client, feature_proposal. pubkey( ) ) . await ,
179
+ get_account_data :: <FeatureProposal >( & mut banks_client, feature_proposal. pubkey( ) ) . await ,
179
180
Ok ( FeatureProposal :: Accepted {
180
181
tokens_upon_acceptance: 42
181
182
} )
0 commit comments