tests: .lamports -> .lamports() (#16976)

This commit is contained in:
Jeff Washington (jwash)
2021-04-30 13:16:58 -05:00
committed by GitHub
parent 3f982fcf65
commit ac87bc40ca
3 changed files with 52 additions and 40 deletions

View File

@@ -2290,12 +2290,12 @@ mod tests {
&mut MockInvokeContext::new(keyed_accounts)
)
);
assert_eq!(0, buffer_account.borrow().lamports);
assert_eq!(0, buffer_account.borrow().lamports());
assert_eq!(
min_programdata_balance,
programdata_account.borrow().lamports
programdata_account.borrow().lamports()
);
assert_eq!(1, spill_account.borrow().lamports);
assert_eq!(1, spill_account.borrow().lamports());
let state: UpgradeableLoaderState = programdata_account.borrow().state().unwrap();
assert_eq!(
state,

View File

@@ -421,7 +421,7 @@ mod tests {
for ((account, account_info), key) in accounts.iter().zip(de_accounts).zip(keys.clone()) {
assert_eq!(key, *account_info.key);
let account = account.borrow();
assert_eq!(account.lamports, account_info.lamports());
assert_eq!(account.lamports(), account_info.lamports());
assert_eq!(account.data(), &account_info.data.borrow()[..]);
assert_eq!(account.owner(), account_info.owner);
assert_eq!(account.executable(), account_info.executable);
@@ -466,7 +466,7 @@ mod tests {
{
assert_eq!(key, *de_keyed_account.unsigned_key());
let account = account.borrow();
assert_eq!(account.lamports, de_keyed_account.lamports().unwrap());
assert_eq!(account.lamports(), de_keyed_account.lamports().unwrap());
assert_eq!(
account.data(),
de_keyed_account.try_account_ref().unwrap().data()
@@ -493,7 +493,7 @@ mod tests {
for ((account, account_info), key) in accounts.iter().zip(de_accounts).zip(keys.clone()) {
assert_eq!(key, *account_info.key);
let account = account.borrow();
assert_eq!(account.lamports, account_info.lamports());
assert_eq!(account.lamports(), account_info.lamports());
assert_eq!(account.data(), &account_info.data.borrow()[..]);
assert_eq!(account.owner(), account_info.owner);
assert_eq!(account.executable(), account_info.executable);
@@ -525,7 +525,7 @@ mod tests {
{
assert_eq!(key, *de_keyed_account.unsigned_key());
let account = account.borrow();
assert_eq!(account.lamports, de_keyed_account.lamports().unwrap());
assert_eq!(account.lamports(), de_keyed_account.lamports().unwrap());
assert_eq!(
account.data(),
de_keyed_account.try_account_ref().unwrap().data()