You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/++Adds two numbers and retuns the resultParams: a = First value to add b = Second value to addExamples:----int z = add(1, 4);----+/intadd(int a, int b) {
return a + b;
}
To this:
/++Adds two numbers and retuns the resultParams: a = First value to add b = Second value to add+/intadd(int a, int b) {
return a + b;
}
///unittest {
int z = add(1, 4) ;
}
The example in the first docstring will not be verified. We can move it to a unittest and use /// to tell ddoc that it is the example.
The text was updated successfully, but these errors were encountered:
workhorsy
changed the title
Change doc examples to checked at compile time
Change doc examples to be checked at compile time
Jan 23, 2021
Change this:
To this:
The example in the first docstring will not be verified. We can move it to a
unittest
and use///
to tell ddoc that it is the example.The text was updated successfully, but these errors were encountered: