D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14622 - documented unit test that follows an undocumented symbol silently ignored
Summary: documented unit test that follows an undocumented symbol silently ignored
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords: ddoc, diagnostic, pull
Depends on:
Blocks:
 
Reported: 2015-05-26 18:02 UTC by Steven Schveighoffer
Modified: 2024-12-13 18:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Steven Schveighoffer 2015-05-26 18:02:06 UTC
Consider this:

/// document foo
void foo(int) {...}

void foo(string) {...}

///
unittest
{
    // use foo like this!
    foo(1);
}

The unit test is not included in the documentation, because foo(string) was not ditto'd. But clearly, the unit test was supposed to be part of the documentation.

I propose we make a documented unit test that isn't attached to any symbol a warning when generating documentation.
Comment 1 Dlang Bot 2022-10-05 14:51:19 UTC
@ntrel created dlang/dmd pull request #14527 "Fix Issue 14622 - documented unit test following undocumented symbol" fixing this issue:

- Fix Issue 14622 - documented unit test following undocumented symbol

https://github.com/dlang/dmd/pull/14527
Comment 2 dlangBugzillaToGithub 2024-12-13 18:43:02 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18994

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB