Crate godot_testability_runtime

Crate godot_testability_runtime 

Source
Expand description

§Godot Testability Runtime

An embedded Godot runtime for Rust testing, inspired by SwiftGodot’s testability framework. Enables running tests within a real Godot runtime environment with full engine API access.

§Quick Start

use godot::prelude::*;
use godot_testability_runtime::prelude::*;
use godot_testability_runtime::godot_test_main;

fn test_vectors(scene_tree: &mut Gd<SceneTree>) -> TestResult<()> {
    let v = Vector2::new(1.0, 2.0);
    assert_eq!(v.x, 1.0);
    Ok(())
}

godot_test_main! {
    test_vectors,
}

Re-exports§

pub use error::TestError;
pub use error::TestResult;
pub use runtime::GodotRuntime;

Modules§

error
Error types for the testability framework.
ffi
FFI bindings to libgodot for embedded runtime support.
prelude
Prelude module for convenient imports.
runtime
Godot runtime management for embedded testing.
test_main
Macro for generating the test main function with minimal boilerplate.

Macros§

godot_test_main
Generates a main function for running Godot tests with cargo test.