v0.3.16-pre.002
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
// file: crates/ksp-store-api/tests/release_completeness.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
//! Release-level boundary and completeness canaries for the backend-neutral Store API RAW surface.
|
||||
|
||||
#[test]
|
||||
fn v0_3_8_pre_003_exact_crate_root_export_inventory_is_stable() {
|
||||
let crate_root = include_str!("../src/lib.rs");
|
||||
@@ -57,6 +56,7 @@ fn v0_3_8_pre_003_exact_crate_root_export_inventory_is_stable() {
|
||||
"pub use self::model::raw_outcome::RawAcquisitionWriteOutcome;",
|
||||
"pub use self::model::raw_outcome::RawEntityWriteOutcome;",
|
||||
"pub use self::model::raw_outcome::RawObservationWriteOutcome;",
|
||||
"pub use self::model::raw_outcome::RawTransactionVariantWriteOutcome;",
|
||||
"pub use self::model::raw_pagination::MAX_RAW_PAGE_CURSOR_BYTES;",
|
||||
"pub use self::model::raw_pagination::RawAccountStateQuery;",
|
||||
"pub use self::model::raw_pagination::RawPage;",
|
||||
@@ -87,15 +87,21 @@ fn v0_3_8_pre_003_exact_crate_root_export_inventory_is_stable() {
|
||||
"pub use self::model::raw_retention::RawTransactionRetentionTransition;",
|
||||
"pub use self::model::raw_retention::RawTransactionTombstone;",
|
||||
"pub use self::model::raw_transaction::RawTransaction;",
|
||||
"pub use self::model::raw_transaction::RawTransactionConflictStatus;",
|
||||
"pub use self::model::raw_transaction::RawTransactionObservation;",
|
||||
"pub use self::model::raw_transaction::RawTransactionReference;",
|
||||
"pub use self::model::raw_transaction::RawTransactionVariantComparison;",
|
||||
"pub use self::model::raw_transaction::RawTransactionVariantId;",
|
||||
"pub use self::model::raw_transaction::RawTransactionVariantOrigin;",
|
||||
"pub use self::model::raw_transaction::RawTransactionVariantReference;",
|
||||
"pub use self::model::raw_transaction::RawTransactionVariantRelation;",
|
||||
"pub use self::model::raw_transaction::RawTransactionVariantRelationReason;",
|
||||
];
|
||||
expected.sort_unstable();
|
||||
assert_eq!(actual, expected);
|
||||
assert!(!crate_root.contains("pub mod "));
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_8_pre_003_exact_production_module_inventory_is_raw_only() {
|
||||
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("src");
|
||||
@@ -125,7 +131,6 @@ fn v0_3_8_pre_003_exact_production_module_inventory_is_raw_only() {
|
||||
assert_eq!(capability_names, std::vec!["raw_account.rs", "raw_retention.rs", "raw_transaction.rs"]);
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_007_public_evolutive_enums_remain_non_exhaustive() {
|
||||
let sources = [
|
||||
@@ -133,6 +138,7 @@ fn pre_007_public_evolutive_enums_remain_non_exhaustive() {
|
||||
include_str!("../src/model/raw_pagination.rs"),
|
||||
include_str!("../src/model/raw_primitives.rs"),
|
||||
include_str!("../src/model/raw_retention.rs"),
|
||||
include_str!("../src/model/raw_transaction.rs"),
|
||||
];
|
||||
for enum_name in [
|
||||
"RawAcquisitionOrigin",
|
||||
@@ -142,12 +148,16 @@ fn pre_007_public_evolutive_enums_remain_non_exhaustive() {
|
||||
"RawRetentionWriteOutcome",
|
||||
"RawSortDirection",
|
||||
"RawTransactionAcquisitionMode",
|
||||
"RawTransactionConflictStatus",
|
||||
"RawTransactionVariantOrigin",
|
||||
"RawTransactionVariantRelation",
|
||||
"RawTransactionVariantRelationReason",
|
||||
"RawTransactionVariantWriteOutcome",
|
||||
] {
|
||||
assert_non_exhaustive(&sources, enum_name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_007_interface_store_ownership_and_negative_scope_remain_explicit() {
|
||||
let interface_root = include_str!("../../ksp-interface-lib/src/lib.rs");
|
||||
@@ -189,7 +199,6 @@ fn pre_007_interface_store_ownership_and_negative_scope_remain_explicit() {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_8_pre_003_capability_inventory_stays_fine_grained_without_runtime_facade() {
|
||||
let sources = [
|
||||
@@ -227,7 +236,6 @@ fn v0_3_8_pre_003_capability_inventory_stays_fine_grained_without_runtime_facade
|
||||
assert_eq!(traits, expected);
|
||||
return;
|
||||
}
|
||||
|
||||
fn assert_non_exhaustive(sources: &[&str], enum_name: &str) {
|
||||
let needle = "#[non_exhaustive]\n";
|
||||
let declaration = std::format!("pub enum {enum_name}");
|
||||
@@ -243,7 +251,6 @@ fn assert_non_exhaustive(sources: &[&str], enum_name: &str) {
|
||||
assert!(found, "public evolutive enum not found: {enum_name}");
|
||||
return;
|
||||
}
|
||||
|
||||
fn rust_file_names(directory: &std::path::Path) -> std::io::Result<std::vec::Vec<std::string::String>> {
|
||||
let entries = match std::fs::read_dir(directory) {
|
||||
std::result::Result::Ok(value) => value,
|
||||
|
||||
Reference in New Issue
Block a user