theseion / Fuel

Fuel, the Smalltalk object serializer
https://theseion.github.io/Fuel
MIT License
27 stars 12 forks source link

Complete tests of block closures #141

Closed GoogleCodeExporter closed 7 months ago

GoogleCodeExporter commented 9 years ago
Add more exhaustive test cases.

Extracted from Juan Vuletich's mail 
(http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.general/160139):

testIsClean
  "
  ClosureTests new testIsClean
  "
  | tempVar |
  tempVar := 1.
  self assert: [ 3 + 4 ] isClean.
  self assert: [ :a | a * 2 ] isClean.
  self assert: [ Smalltalk size ] isClean.
  self assert: [ :blockArg | blockArg printString ] isClean.
  self assert: [ | blockTemp | blockTemp printString ] isClean.
  self assert: [ | blockTemp | blockTemp :=7 ] isClean.
  self deny: [ | outerBlockTemp | [ outerBlockTemp printString ] isClean ] value.
  self deny: [ | outerBlockTemp | [ outerBlockTemp :=7 ] isClean ] value.
  self deny: [ tempVar + 1 ] isClean.
  self deny: [ tempVar := 1 ] isClean.
  self deny: [ ivar + 1 ] isClean.
  self deny: [ ivar := 1 ] isClean.
  self deny: [ ^ true ] isClean.
  self deny: [ self printString ] isClean.
  self deny: [ ^ self ] isClean.
  self deny: [ ClassVar + 1 ] isClean.
  self deny: [ ClassVar := 1 ] isClean.

Original issue reported on code.google.com by tinchod...@gmail.com on 27 Mar 2012 at 3:03

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.

tinchodias commented 7 months ago

I'd close this issue. Tool old, and I've just looked at FLBlockClosureSerializationTest in Pharo 12 and it looks complete enough. Also, time passed and Pharo block closures have changed.

@theseion Please reopen it if you consider

theseion commented 7 months ago

Sure. Thanks for cleaning up!