[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72kq8EMKkehTQS2odA-AVqxZe=EQs4yj4tQ8CK3zi9e9Pw@mail.gmail.com>
Date: Wed, 2 Jul 2025 14:34:23 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: a.hindborg@...nel.org, ojeda@...nel.org, alex.gaynor@...il.com,
aliceryhl@...gle.com, anna-maria@...utronix.de, bjorn3_gh@...tonmail.com,
boqun.feng@...il.com, dakr@...nel.org, frederic@...nel.org, gary@...yguo.net,
jstultz@...gle.com, linux-kernel@...r.kernel.org, lossin@...nel.org,
lyude@...hat.com, rust-for-linux@...r.kernel.org, sboyd@...nel.org,
tglx@...utronix.de, tmgross@...ch.edu
Subject: Re: [PATCH v1] rust: time: Add examples with doctest for Delta
On Wed, Jul 2, 2025 at 11:09 AM FUJITA Tomonori
<fujita.tomonori@...il.com> wrote:
>
> I think that Miguel suggested adding examples but either is fine by me:
>
> https://lore.kernel.org/lkml/CANiq72kiTwpcH6S0XaTEBnLxqyJ6EDVLoZPi9X+MWkanK5wq=w@mail.gmail.com/
Ah, if Andreas was talking about the examples in general (not just the
edge cases within each example, which is what I understood in my
previous reply), then we definitely want to have examples in our
documentation. Unit tests serve a different purpose.
It is a balance -- to me, examples should try to be minimal and yet
show all "cases" a user may need to care about, but if other tests
would be useful as tests (e.g. passing `i64::MAX` as input), then
those would be unit tests.
Cheers,
Miguel
Powered by blists - more mailing lists