use wintf::ecs::GraphicsCore;
#[test]
fn test_graphics_core_creation() {
let result = GraphicsCore::new();
assert!(
result.is_ok(),
"GraphicsCore::new()は成功するべき: {:?}",
result.err()
);
eprintln!("✅ GraphicsCore::new() - 初期化成功");
}
#[test]
fn test_graphics_core_multiple_creation() {
let result1 = GraphicsCore::new();
assert!(result1.is_ok(), "1回目の作成が成功すること");
let result2 = GraphicsCore::new();
assert!(result2.is_ok(), "2回目の作成が成功すること");
eprintln!("✅ GraphicsCore::new() - 複数回の作成が可能");
}
#[test]
fn test_graphics_core_debug_output() {
let graphics = GraphicsCore::new().expect("GraphicsCore作成成功");
let debug_output = format!("{:?}", graphics);
assert!(
debug_output.contains("GraphicsCore"),
"Debug出力にGraphicsCoreが含まれること"
);
eprintln!("✅ GraphicsCore - Debug出力が機能");
}
#[test]
fn test_graphics_core_send_sync() {
fn assert_send<T: Send>() {}
fn assert_sync<T: Sync>() {}
assert_send::<GraphicsCore>();
assert_sync::<GraphicsCore>();
eprintln!("✅ GraphicsCore - Send + Sync実装を確認");
}
#[test]
#[cfg(debug_assertions)]
fn test_debug_build() {
let result = GraphicsCore::new();
assert!(result.is_ok(), "デバッグビルドでGraphicsCore作成成功");
eprintln!("✅ デバッグビルド - 正常に動作");
}
#[test]
#[cfg(not(debug_assertions))]
fn test_release_build() {
let result = GraphicsCore::new();
assert!(result.is_ok(), "リリースビルドでGraphicsCore作成成功");
eprintln!("✅ リリースビルド - 正常に動作");
}