mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-02 13:23:10 +00:00
add tests
This commit is contained in:
parent
4bdd2c6d9f
commit
63cca0f30f
@ -24,3 +24,13 @@ impl PrivateKey {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
#[test]
|
||||
fn test_value_getter() {
|
||||
let key = PrivateKey::try_new([1; 32]).unwrap();
|
||||
assert_eq!(key.value(), &key.0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,11 +73,6 @@ impl V01State {
|
||||
pub(crate) fn builtin_programs(&self) -> &HashMap<ProgramId, Program> {
|
||||
&self.builtin_programs
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn force_insert_account(&mut self, address: Address, account: Account) {
|
||||
self.public_state.insert(address, account);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@ -283,6 +278,10 @@ mod tests {
|
||||
}
|
||||
|
||||
impl V01State {
|
||||
pub fn force_insert_account(&mut self, address: Address, account: Account) {
|
||||
self.public_state.insert(address, account);
|
||||
}
|
||||
|
||||
/// Include test programs in the builtin programs map
|
||||
pub fn with_test_programs(mut self) -> Self {
|
||||
self.insert_program(Program::nonce_changer_program());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user