v0.2.6-pre.016
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-wallet-lib/tests/public_api.rs
|
||||
// version: 10
|
||||
// version: 11
|
||||
|
||||
//! Public API canaries for the Wallet foundation.
|
||||
|
||||
@@ -177,3 +177,31 @@ fn public_pre_008_transfer_adapters_are_available_from_crate_root() {
|
||||
);
|
||||
drop(import_file_future);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn public_pre_016_version_neutral_and_explicit_v2_surfaces_are_available_from_crate_root() {
|
||||
assert_eq!(ksp_wallet_lib::DEFAULT_WALLET_FORMAT, ksp_wallet_lib::WalletFormat::V2);
|
||||
assert_eq!(ksp_wallet_lib::LATEST_SUPPORTED_WALLET_FORMAT, ksp_wallet_lib::WalletFormat::V2);
|
||||
assert_eq!(ksp_wallet_lib::WalletFormat::V1.version(), ksp_wallet_lib::KSPWALLET_FORMAT_VERSION_V1);
|
||||
assert_eq!(ksp_wallet_lib::WalletFormat::V2.version(), ksp_wallet_lib::KSPWALLET_FORMAT_VERSION_V2);
|
||||
let _ = ksp_wallet_lib::create_wallet;
|
||||
let _ = ksp_wallet_lib::create_wallet_v2;
|
||||
let _ = ksp_wallet_lib::open_wallet_view;
|
||||
let _ = ksp_wallet_lib::open_wallet_view_v2;
|
||||
let _ = ksp_wallet_lib::open_wallet_owner;
|
||||
let _ = ksp_wallet_lib::open_wallet_owner_v2;
|
||||
let _ = ksp_wallet_lib::inspect_locked_wallet;
|
||||
let _ = ksp_wallet_lib::inspect_locked_wallet_v2;
|
||||
let path = std::path::Path::new("not-polled-pre016.kspwallet");
|
||||
let owner_password = ksp_wallet_lib::OwnerPassword::new(std::string::String::from("public-pre016-owner-password"));
|
||||
let create_future = ksp_wallet_lib::create_wallet_file(path, owner_password, std::option::Option::None, ksp_wallet_lib::WalletCreateMetadata::default());
|
||||
drop(create_future);
|
||||
let owner_password = ksp_wallet_lib::OwnerPassword::new(std::string::String::from("public-pre016-owner-password"));
|
||||
let create_v2_future =
|
||||
ksp_wallet_lib::create_wallet_file_v2(path, owner_password, std::option::Option::None, ksp_wallet_lib::WalletCreateMetadata::default());
|
||||
drop(create_v2_future);
|
||||
let inspect_future = ksp_wallet_lib::inspect_locked_wallet_file(path);
|
||||
drop(inspect_future);
|
||||
let inspect_v2_future = ksp_wallet_lib::inspect_locked_wallet_file_v2(path);
|
||||
drop(inspect_v2_future);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user