User Tools

Site Tools


at-m42:casestudies:cs04

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
at-m42:casestudies:cs04 [2009/04/15 10:04] eechrisat-m42:casestudies:cs04 [2011/01/14 12:59] (current) – external edit 127.0.0.1
Line 774: Line 774:
       game.addItem(item)       game.addItem(item)
       actual = game.pickupItem(item.id, player.id)       actual = game.pickupItem(item.id, player.id)
-      println actual 
       }       }
             
Line 808: Line 807:
 </code> </code>
  
-Since the violation of an invariant indicates that a serious error has occurred, we terminate the system by throwing an ''Exception'' with a suitable error message. Notice that we do not declare that the method throws an ''Exception''.+Since the violation of an invariant indicates that a serious error has occurred, we terminate the system by throwing an ''Exception'' with a suitable error message. Notice that we do not declare that the method throws an ''Exception'' (see [[at-m42:Exceptions]]).
  
 As before, we only check methods that are likely to cause a violation. In this case it is just the method ''pickupItem''. As before, we only check methods that are likely to cause a violation. In this case it is just the method ''pickupItem''.
Line 872: Line 871:
 Happily all the tests in the ''runAllTests'' script pass. Therefore, at this point, we conduct functional tests by executing a Groovy script from the previous iteration. As expected, no problems occur and we consider this iteration to be finished. Happily all the tests in the ''runAllTests'' script pass. Therefore, at this point, we conduct functional tests by executing a Groovy script from the previous iteration. As expected, no problems occur and we consider this iteration to be finished.
  
-===== Exercises =====+
  
  
at-m42/casestudies/cs04.1239789852.txt.gz · Last modified: 2011/01/14 12:47 (external edit)