Skip to content

Commit 927e5f8

Browse files
committed
Move register-docs test to itest suite
1 parent b6a8779 commit 927e5f8

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

itest/rust/src/register_tests/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ mod func_test;
1212
mod gdscript_ffi_test;
1313
mod naming_tests;
1414
mod option_ffi_test;
15+
mod register_docs_test;
1516
#[cfg(feature = "codegen-full")]
1617
mod rpc_test;
1718
mod var_test;

godot/tests/docs.rs renamed to itest/rust/src/register_tests/register_docs_test.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#![cfg(feature = "register-docs")]
99

10+
use crate::framework::itest;
1011
use godot::prelude::*;
1112

1213
/// *documented* ~ **documented** ~ [AABB] < [pr](https://github.com/godot-rust/gdext/pull/748)
@@ -189,15 +190,16 @@ impl FairlyDocumented {
189190
fn documented_signal(p: Vector3, w: f64, node: Gd<Node>);
190191
}
191192

192-
#[test]
193-
fn correct() {
193+
#[itest(focus)]
194+
fn test_register_docs() {
194195
// Uncomment if implementation changes and expected output file should be rewritten.
195196
// std::fs::write(
196-
// "tests/test_data/docs.xml",
197+
// "res/registered_docs.xml",
197198
// godot_core::docs::gather_xml_docs().next().unwrap(),
198199
// );
200+
199201
assert_eq!(
200-
include_str!("test_data/docs.xml"),
201-
godot_core::docs::gather_xml_docs().next().unwrap()
202+
include_str!("res/registered_docs.xml"),
203+
godot::docs::gather_xml_docs().next().unwrap()
202204
);
203205
}

0 commit comments

Comments
 (0)