#proc-macro-attributes #fluid #testing #wiki

macro fluid_attributes

Proc macro attributes for the fluid crate

2 unstable releases

0.4.0 Apr 8, 2019
0.3.0 Nov 24, 2018

#16 in #fluid

Download history 110/week @ 2024-03-29 91/week @ 2024-04-05 115/week @ 2024-04-12 46/week @ 2024-04-19 54/week @ 2024-04-26 23/week @ 2024-05-03 23/week @ 2024-05-10 21/week @ 2024-05-17 22/week @ 2024-05-24 31/week @ 2024-05-31 31/week @ 2024-06-07 35/week @ 2024-06-14 38/week @ 2024-06-21 21/week @ 2024-06-28 18/week @ 2024-07-05 25/week @ 2024-07-12

106 downloads per month
Used in 3 crates (via fluid)

Apache-2.0

24KB
506 lines

Latest Version Documentation Lines of Code

fluid is a library to write human readable tests.

This crate is in alpha state. It is fully usable, but one can (rightfully) think that there are incomplete or missing features. The maintainer would be very happy if he was given some feedback, issues, pull requests, etc.


fluid is a crate to make the tests more readable and easier to write, mainly inspired by xUnit. It is still in an unstable state. Be adviced that in future alphas — let alone in the release — it could/will be very different.

Wiki

Detailed information is in the wiki.

Goals

The current goals are to provide:

  • ☑ Easily readable tests: they should be read like english sentences.
  • ☑ Nice and understandable error messages.
  • ☐ The most possible useful assertions for common cases: numbers, Iterators, Options, Results, etc.
  • ☐ A full test framework that launches the tests, displays the failures, etc. Since this feature is not stabilized, it will be gated in the nightly compiler.

Non-goals:

  • Run the tests fast: under the hood, there are some code generation at compile-time, especially for the #[theory] and/or #[session] tests. This will never be as fast as the standard tests.

Known bugs/limitations

  • The stringification of the left element is not perfect when the procedural macros are used. That is because there is no way to render the token as they were written by the user (as far as I know).
  • Hygiene issue. For now, every span is located at the macro call site. That means that the tests report a failure at the #[fact], #[theory] or #[session] line.

Changelog

See the dedicated file.

Roadmap

See the dedicated file.

Dependencies

~3MB
~60K SLoC