mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Consolidate Rust unit tests under dedicated test modules (#56247)
## What changed Move inline crate tests into `lib_tests.rs` and nest related test suites under each crate's `tests` module. Update imports, subprocess test filters, logging targets, and snapshot names to match the new module paths. Keep test helpers accessible where needed and preserve the schema writer's exact test name used by release tooling. GitOrigin-RevId: de55eaae66dce4941abb33dd0b2f170093daa8f9
This commit is contained in:
committed by
copyberry
parent
22db5847c8
commit
c227654800
@@ -1,17 +1,7 @@
|
||||
mod experimental_api;
|
||||
#[cfg(test)]
|
||||
mod export;
|
||||
mod precomputed_exports;
|
||||
#[cfg(test)]
|
||||
#[path = "precomputed_exports_tests.rs"]
|
||||
mod precomputed_exports_tests;
|
||||
mod protocol;
|
||||
pub mod rpc;
|
||||
#[cfg(test)]
|
||||
mod schema_fixtures;
|
||||
#[cfg(test)]
|
||||
#[path = "schema_fixtures_tests.rs"]
|
||||
mod schema_fixtures_tests;
|
||||
|
||||
pub use experimental_api::*;
|
||||
pub use precomputed_exports::GenerateTsOptions;
|
||||
@@ -69,3 +59,14 @@ pub(crate) use codex_app_server_protocol_noop_macros::TS;
|
||||
pub(crate) use schemars::JsonSchema;
|
||||
#[cfg(test)]
|
||||
pub(crate) use ts_rs::TS;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "lib_tests.rs"]
|
||||
mod tests;
|
||||
// Release tooling selects this module's schema writer by its exact test name.
|
||||
#[cfg(test)]
|
||||
mod schema_fixtures_tests;
|
||||
#[cfg(test)]
|
||||
use tests::export;
|
||||
#[cfg(test)]
|
||||
use tests::schema_fixtures;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#![cfg(test)]
|
||||
|
||||
#[path = "export.rs"]
|
||||
pub(crate) mod export;
|
||||
#[path = "precomputed_exports_tests.rs"]
|
||||
mod precomputed_exports_tests;
|
||||
#[path = "schema_fixtures.rs"]
|
||||
pub(crate) mod schema_fixtures;
|
||||
Reference in New Issue
Block a user