committed by
GitHub
parent
1da1667920
commit
58ef02f02b
@ -319,7 +319,7 @@ mod tests {
|
||||
Err(InstructionError::NotEnoughAccountKeys),
|
||||
process_instruction(
|
||||
&bpf_loader::id(),
|
||||
&vec![],
|
||||
&[],
|
||||
&instruction_data,
|
||||
&mut MockInvokeContext::default()
|
||||
)
|
||||
@ -385,7 +385,7 @@ mod tests {
|
||||
Err(InstructionError::NotEnoughAccountKeys),
|
||||
process_instruction(
|
||||
&bpf_loader::id(),
|
||||
&vec![],
|
||||
&[],
|
||||
&instruction_data,
|
||||
&mut MockInvokeContext::default()
|
||||
)
|
||||
@ -453,8 +453,8 @@ mod tests {
|
||||
Err(InstructionError::NotEnoughAccountKeys),
|
||||
process_instruction(
|
||||
&bpf_loader::id(),
|
||||
&vec![],
|
||||
&vec![],
|
||||
&[],
|
||||
&[],
|
||||
&mut MockInvokeContext::default()
|
||||
)
|
||||
);
|
||||
@ -465,7 +465,7 @@ mod tests {
|
||||
process_instruction(
|
||||
&bpf_loader::id(),
|
||||
&keyed_accounts,
|
||||
&vec![],
|
||||
&[],
|
||||
&mut MockInvokeContext::default()
|
||||
)
|
||||
);
|
||||
@ -477,7 +477,7 @@ mod tests {
|
||||
process_instruction(
|
||||
&bpf_loader::id(),
|
||||
&keyed_accounts,
|
||||
&vec![],
|
||||
&[],
|
||||
&mut MockInvokeContext::default()
|
||||
)
|
||||
);
|
||||
@ -491,7 +491,7 @@ mod tests {
|
||||
process_instruction(
|
||||
&bpf_loader::id(),
|
||||
&keyed_accounts,
|
||||
&vec![],
|
||||
&[],
|
||||
&mut MockInvokeContext::default()
|
||||
)
|
||||
);
|
||||
@ -507,7 +507,7 @@ mod tests {
|
||||
process_instruction(
|
||||
&bpf_loader::id(),
|
||||
&keyed_accounts,
|
||||
&vec![],
|
||||
&[],
|
||||
&mut MockInvokeContext::default()
|
||||
)
|
||||
);
|
||||
@ -568,7 +568,7 @@ mod tests {
|
||||
let _result = process_instruction(
|
||||
&bpf_loader::id(),
|
||||
&keyed_accounts,
|
||||
&vec![],
|
||||
&[],
|
||||
&mut MockInvokeContext::default(),
|
||||
);
|
||||
},
|
||||
|
@ -775,9 +775,10 @@ mod tests {
|
||||
(true, START + LENGTH / 2, LENGTH / 2, addr + LENGTH / 2),
|
||||
];
|
||||
for (ok, start, length, value) in cases {
|
||||
match ok {
|
||||
true => assert_eq!(translate!(start, length, ®ions).unwrap(), value),
|
||||
false => assert!(translate!(start, length, ®ions).is_err()),
|
||||
if ok {
|
||||
assert_eq!(translate!(start, length, ®ions).unwrap(), value)
|
||||
} else {
|
||||
assert!(translate!(start, length, ®ions).is_err())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user