Re: [PATCH v3 2/3] rust: macros: add macro to easily run KUnit tests

2024-10-31 Thread David Gow
On Wed, 30 Oct 2024 at 13:11, Boqun Feng wrote: > > On Wed, Oct 30, 2024 at 12:57:14PM +0800, David Gow wrote: > > From: José Expósito > > Add a new procedural macro (`#[kunit_tests(kunit_test_suit_name)]`) to > > run KUnit tests using a user-space like syntax. > > > > The macro, that should be u

Re: [PATCH v3 2/3] rust: macros: add macro to easily run KUnit tests

2024-10-29 Thread Boqun Feng
On Tue, Oct 29, 2024 at 10:11:38PM -0700, Boqun Feng wrote: [...] > > + > > +let new_body: TokenStream = vec![body.stream(), > > kunit_macros.parse().unwrap()] > > +.into_iter() > > +.collect(); > > + > > +// Remove the `#[test]` macros. > > +let new_body = new_body.to_

Re: [PATCH v3 2/3] rust: macros: add macro to easily run KUnit tests

2024-10-29 Thread Boqun Feng
On Wed, Oct 30, 2024 at 12:57:14PM +0800, David Gow wrote: > From: José Expósito > Add a new procedural macro (`#[kunit_tests(kunit_test_suit_name)]`) to > run KUnit tests using a user-space like syntax. > > The macro, that should be used on modules, transforms every `#[test]` > in a `kunit_case!