Skip to content

Adding more executable comments #15844

@Ducasse

Description

@Ducasse

Here is a method with typical executable comments.

> aString
	"Answer whether the receiver sorts after aString.
	The collation order is simple ascii (with case differences)."

	" 'def' > 'abc' >>> true"
	" 'def' > 'def' >>> false"
	" 'abc' > 'def' >>> false"

	^ (self compare: self with: aString) > 0

" 'def' > 'abc' >>> true" is an executable comment.
The idea is to have little examples that we can check by executable the first part 'def' > 'abc' and this part should return the second part here true.

We need to add more of them to core classes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions