stevenliebregt/fun_time

test suite broken

tenzap opened this issue · 2 comments

tenzap commented

It seems there is problem when running the test suite with cargo test

It particularly fails with these 2 argument sets: --all-targets & --all-targets --no-default-features

    Updating crates.io index
  Downloaded colored v2.1.0
  Downloaded 1 crate (23.3 KB) in 1.01s
   Compiling proc-macro2 v1.0.76
   Compiling unicode-ident v1.0.12
   Compiling syn v1.0.109
   Compiling strsim v0.10.0
   Compiling ident_case v1.0.1
   Compiling fnv v1.0.7
   Compiling libc v0.2.152
   Compiling time-core v0.1.2
   Compiling powerfmt v0.2.0
   Compiling deranged v0.3.11
   Compiling time-macros v0.2.16
   Compiling lazy_static v1.4.0
   Compiling itoa v1.0.10
   Compiling num_threads v0.1.6
   Compiling colored v2.1.0
   Compiling quote v1.0.35
   Compiling log v0.4.20
   Compiling time v0.3.31
   Compiling simple_logger v4.3.3
   Compiling darling_core v0.14.4
   Compiling darling_macro v0.14.4
   Compiling darling v0.14.4
   Compiling fun_time_derive v0.3.3
   Compiling fun_time v0.3.3 (/path_to/fun-time)
error: Unsupported value for `reporting` attribute: log. Use one of: println, (only with log feature) log
  --> src/lib.rs:22:65
   |
22 |     #[fun_time(when = "debug", message = "having fun with log", reporting = "log")]
   |                                                                 ^^^^^^^^^

error: Unknown field: `level`
  --> src/lib.rs:42:9
   |
42 |         level = "debug",
   |         ^^^^^

error: Unsupported value for `reporting` attribute: log. Use one of: println, (only with log feature) log
  --> src/lib.rs:43:9
   |
43 |         reporting = "log"
   |         ^^^^^^^^^

error[E0425]: cannot find function `have_fun` in this scope
  --> src/lib.rs:58:9
   |
58 |         have_fun("Alice".to_string(), "Bob".to_string());
   |         ^^^^^^^^ not found in this scope

error[E0425]: cannot find function `have_fun_with_parameters` in this scope
  --> src/lib.rs:65:9
   |
65 |         have_fun_with_parameters(
   |         ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
error: could not compile `fun_time` due to 5 previous errors

I see, it seems I forgot to put the tests that use any of the features behind a config guard of the same feature. I'll fix that

Thanks for bringing it to my attention, fixed in 0.3.4 https://github.com/stevenliebregt/fun_time/releases/tag/0.3.4