pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Adding more executable comments

Open Ducasse opened this issue 2 years ago • 1 comments

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.

Ducasse avatar Dec 24 '23 16:12 Ducasse

Could you, give more detail about what is a core class, please ? Thank you in advance

JulienLamhene avatar Jun 28 '24 08:06 JulienLamhene