From 1599631431159ccd9838ed353e85fbe10bbfa1a5 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 4 May 2024 10:40:17 +0200 Subject: [PATCH] test(tests): Update to new String wrapper --- tests/attribute_doc_comments/expected.md | 5 ++++- tests/doc_comments/expected.md | 5 ++++- tests/multi_line_doc_comment/expected.md | 5 ++++- tests/trinitrix_api/expected.md | 21 ++++++++++++++------- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/tests/attribute_doc_comments/expected.md b/tests/attribute_doc_comments/expected.md index 7777b75..0bf24ed 100644 --- a/tests/attribute_doc_comments/expected.md +++ b/tests/attribute_doc_comments/expected.md @@ -15,7 +15,10 @@ pub mod trinitrix { pub enum Trinitrix { /// Attribute doc comment, but very ##" "## "# " escaped #[allow(non_camel_case_types)] - hi { trixy_output: trixy::oneshot::Sender, name: String }, + hi { + trixy_output: trixy::oneshot::Sender, + name: trixy::types::newtypes::String, + }, } } /* C API */ diff --git a/tests/doc_comments/expected.md b/tests/doc_comments/expected.md index ff803d5..a985996 100644 --- a/tests/doc_comments/expected.md +++ b/tests/doc_comments/expected.md @@ -15,7 +15,10 @@ pub mod trinitrix { pub enum Trinitrix { /// Second doc comment #[allow(non_camel_case_types)] - hi { trixy_output: trixy::oneshot::Sender, name: String }, + hi { + trixy_output: trixy::oneshot::Sender, + name: trixy::types::newtypes::String, + }, } } /* C API */ diff --git a/tests/multi_line_doc_comment/expected.md b/tests/multi_line_doc_comment/expected.md index 3544702..4dd53cf 100644 --- a/tests/multi_line_doc_comment/expected.md +++ b/tests/multi_line_doc_comment/expected.md @@ -18,7 +18,10 @@ pub mod trinitrix { pub enum Trinitrix { ///I \n also \n contain \n them #[allow(non_camel_case_types)] - hi { trixy_output: trixy::oneshot::Sender, name: String }, + hi { + trixy_output: trixy::oneshot::Sender, + name: trixy::types::newtypes::String, + }, } } /* C API */ diff --git a/tests/trinitrix_api/expected.md b/tests/trinitrix_api/expected.md index 5d50051..97101a3 100644 --- a/tests/trinitrix_api/expected.md +++ b/tests/trinitrix_api/expected.md @@ -34,7 +34,7 @@ pub mod trinitrix { /// Send a message to the current room /// The send message is interpreted literally. #[allow(non_camel_case_types)] - room_message_send { message: String }, + room_message_send { message: trixy::types::newtypes::String }, Ui(ui::Ui), Keymaps(keymaps::Keymaps), Raw(raw::Raw), @@ -105,15 +105,22 @@ pub mod trinitrix { pub enum Keymaps { /// Add a new keymapping #[allow(non_camel_case_types)] - add { mode: String, key: String, callback: extern "C" fn() }, + add { + mode: trixy::types::newtypes::String, + key: trixy::types::newtypes::String, + callback: extern "C" fn(), + }, /// Remove a keymapping /// /// Does nothing, if the keymapping doesn't exists yet #[allow(non_camel_case_types)] - remove { mode: String, key: String }, + remove { + mode: trixy::types::newtypes::String, + key: trixy::types::newtypes::String, + }, /// List declared keymappings #[allow(non_camel_case_types)] - get { mode: String }, + get { mode: trixy::types::newtypes::String }, } } /// Functions only used internally within Trinitrix @@ -122,17 +129,17 @@ pub mod trinitrix { pub enum Raw { /// Send an error to the default error output #[allow(non_camel_case_types)] - raise_error { error_message: String }, + raise_error { error_message: trixy::types::newtypes::String }, /// Send output to the default output /// This is mainly used to display the final /// output of evaluated lua commands. #[allow(non_camel_case_types)] - display_output { output_message: String }, + display_output { output_message: trixy::types::newtypes::String }, /// Input a character without checking for possible keymaps /// If the current state does not expect input, this character is ignored /// The encoding is the same as in the `trinitrix.api.keymaps` commands #[allow(non_camel_case_types)] - send_input_unprocessed { input: String }, + send_input_unprocessed { input: trixy::types::newtypes::String }, Private(__private::Private), } /// This namespace is used to store some command specific data (like functions, as