From 5371080327ec491afbe1ac92cd452f3804b8d815 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 3 Jan 2024 02:55:29 +0100 Subject: [PATCH] Add three more tests --- micronfig_macros/tests/sources/string_multi_explicit.rs | 9 +++++++++ micronfig_macros/tests/sources/string_multi_implicit.rs | 9 +++++++++ micronfig_macros/tests/sources/string_single_implicit.rs | 7 +++++++ micronfig_macros/tests/tests.rs | 3 +++ 4 files changed, 28 insertions(+) create mode 100644 micronfig_macros/tests/sources/string_multi_explicit.rs create mode 100644 micronfig_macros/tests/sources/string_multi_implicit.rs create mode 100644 micronfig_macros/tests/sources/string_single_implicit.rs diff --git a/micronfig_macros/tests/sources/string_multi_explicit.rs b/micronfig_macros/tests/sources/string_multi_explicit.rs new file mode 100644 index 0000000..bc3757a --- /dev/null +++ b/micronfig_macros/tests/sources/string_multi_explicit.rs @@ -0,0 +1,9 @@ +micronfig::config! { + GARAS: String, + AUTO: String, + BUS: String, +} + +fn main() { + println!("{:?} {:?} {:?}", GARAS(), AUTO(), BUS()) +} diff --git a/micronfig_macros/tests/sources/string_multi_implicit.rs b/micronfig_macros/tests/sources/string_multi_implicit.rs new file mode 100644 index 0000000..e31741b --- /dev/null +++ b/micronfig_macros/tests/sources/string_multi_implicit.rs @@ -0,0 +1,9 @@ +micronfig::config! { + GARAS, + AUTO, + BUS, +} + +fn main() { + println!("{:?} {:?} {:?}", GARAS(), AUTO(), BUS()) +} diff --git a/micronfig_macros/tests/sources/string_single_implicit.rs b/micronfig_macros/tests/sources/string_single_implicit.rs new file mode 100644 index 0000000..9f6ca4c --- /dev/null +++ b/micronfig_macros/tests/sources/string_single_implicit.rs @@ -0,0 +1,7 @@ +micronfig::config! { + GARASAUTO, +} + +fn main() { + println!("{:?}", GARASAUTO()) +} diff --git a/micronfig_macros/tests/tests.rs b/micronfig_macros/tests/tests.rs index c1029be..7a53f9c 100644 --- a/micronfig_macros/tests/tests.rs +++ b/micronfig_macros/tests/tests.rs @@ -18,3 +18,6 @@ macro_rules! fail { pass!(empty); pass!(string_single_explicit); +pass!(string_single_implicit); +pass!(string_multi_explicit); +pass!(string_multi_implicit); \ No newline at end of file