Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate #asArray send in tests #369

Open
bencoman opened this issue May 28, 2019 · 0 comments
Open

Generate #asArray send in tests #369

bencoman opened this issue May 28, 2019 · 0 comments

Comments

@bencoman
Copy link
Contributor

The following is a typical test...

FlattenArrayTest >> test01_NoNesting [
		| result |	
		result := flattenArrayCalculator flattenArray: #(0 1 2 ) .
		self assert: result equals: #(0 1 2 )

Personally use OrderedCollection much more often than Arrays, and such an assert line forces #asArray to be sent before returning the solution, which is irrelevant noise for the student to deal with.

I propose the #asArray send be generated as part of the test...

FlattenArrayTest >> test01_NoNesting [
		| result |	
		result := flattenArrayCalculator flattenArray: #(0 1 2 ) .
		self assert: result asArray equals: #(0 1 2 )

Its a non-breaking change and existing solutions can be updated as time permits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant