March 24

On Tuesday, 30 April 2024 at 17:02:51 UTC, Steven Schveighoffer wrote:

>

I want to propose that we provide a mechanism to semantically detach unit tests from the scope they are written in. Such unittests would be treated as if they were not in the same scope or module. This includes detached unit tests inside templates. The only stipulation is that the current module is assumed imported.

[...]

What I do is put the tests in another module.

March 24

On Monday, 24 March 2025 at 15:03:09 UTC, Atila Neves wrote:

>

On Tuesday, 30 April 2024 at 17:02:51 UTC, Steven Schveighoffer wrote:

>

I want to propose that we provide a mechanism to semantically detach unit tests from the scope they are written in. Such unittests would be treated as if they were not in the same scope or module. This includes detached unit tests inside templates. The only stipulation is that the current module is assumed imported.

[...]

What I do is put the tests in another module.

That's what I also suggest. Doing black box tests (aka test that should not have access to interna) in the same module makes the whole point of them moot. Because else writing them would alter the source-code file under test, which is not allowed.

March 28

On Monday, 24 March 2025 at 15:03:09 UTC, Atila Neves wrote:

>

What I do is put the tests in another module.

Then documented unittests don't work.

1 2
Next ›   Last »