Files
hemx/slhx-derive/tests/surface.rs
T
slhx agent 102e3247bc fix(derive): keep components incremental
Let #[slhx::component] preserve inline modules when generated symbols are absent, while still enforcing handler completeness when slhx.syms exists.

req: component/005

req: test/002
2026-05-25 22:33:56 +02:00

22 lines
403 B
Rust

use slhx_derive::{component, surface};
#[component]
mod local_component {
pub const EXISTING: u8 = 1;
}
#[surface]
mod ui {
pub const EXISTING: u8 = 1;
}
#[test]
fn surface_macro_preserves_inline_module_with_generated_file() {
assert_eq!(ui::EXISTING, 1);
}
#[test]
fn component_macro_preserves_inline_module_without_generated_symbols() {
assert_eq!(local_component::EXISTING, 1);
}