text function not returning comments
A Logo programming environment for Microsoft Windows
Brought to you by:
david_costanzo
I would like to add unit testing to FMSLogo.
A simple soluttion would look similar to
to myfun :x
;assert: (myfun 2) = 4
output :x * :x
end
The could easily be implemented if
text "myfun returned the command line.
But it doesn't
Would it be hard to add this?
Another question.
I could not find any reference to comment or to the semicolon in the documentation. Is there none? In that case, shouldn't this be added?
Logged In: NO
I found the explanation of comments in the help for Tokenization.
I suggest the items ';', 'semicolon', and 'comment' should be added to
the index referring to this help page.
Logged In: YES
user_id=109252
Originator: NO
Good call. I've added ";", "semicolon", and "comment" to the index. This will be available in FMSLogo 6.22.0.
I don't understand what it means for TEXT to return the command line or why that helps make testing easier. TEXT does tell you what the formal arguments are.
Are you looking to test FMSLogo itself, or build a framework for testing operations that you write? If it's the former, then FMSLogo already has an extensive set of tests and it'd be better to plug into that rather than invent a new framework. If it's the latter, then take a look at FULLTEXT, which will give you your ";assert" lines. Also keep in mind that most Logo procedures aren't pure functions--the interesting aspects are the side-effects. For example, simply validating outputs doesn't help test a command that draws a square.
I am closing this request because, as far as I can tell, everything that you've asked for already exists, was recently added, or isn't necessary. If I have misunderstood your request, feel free to reopen this request.