|
|
|
@ -3661,7 +3661,7 @@ unittest
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* If statement tests
|
|
|
|
|
* Comments tests
|
|
|
|
|
*/
|
|
|
|
|
unittest
|
|
|
|
|
{
|
|
|
|
@ -3711,6 +3711,13 @@ void function(int i, int p)
|
|
|
|
|
|
|
|
|
|
TypeChecker tc = new TypeChecker(compiler);
|
|
|
|
|
|
|
|
|
|
/* Find the variable named `p` and get its comment */
|
|
|
|
|
Entity varEnt = tc.getResolver().resolveBest(modulle, "p");
|
|
|
|
|
Variable var = cast(Variable)varEnt;
|
|
|
|
|
Comment varComment = var.getComment();
|
|
|
|
|
assert(varComment);
|
|
|
|
|
assert(varComment.getContent() == "Comment for Elise");
|
|
|
|
|
|
|
|
|
|
/* Find the function named `function` and get its comment */
|
|
|
|
|
Entity funcEnt = tc.getResolver().resolveBest(modulle, "function");
|
|
|
|
|
Function func = cast(Function)funcEnt;
|
|
|
|
|