Prims - die halts execution
authorFrank Duncan <frank@kank.net>
Sat, 14 May 2016 01:09:03 +0000 (20:09 -0500)
committerFrank Duncan <frank@kank.net>
Sat, 14 May 2016 01:09:03 +0000 (20:09 -0500)
src/main/nvm/nvm.lisp
src/test/simpletests.lisp

index 098133282e58a53c9cb8229a8f7d5a6f7e89b727..c31640e24b1333bd2fdd8dc4f7416a93331d2701 100644 (file)
@@ -91,7 +91,8 @@ DESCRIPTION:
   See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#die"
  (when (not (turtle-p *self*)) (error "Gotta call die in turtle scope, dude (~A)" *self*))
  (setf (turtle-who *self*) -1)
- (setf *turtles* (remove *self* *turtles*)))
+ (setf *turtles* (remove *self* *turtles*))
+ (error (make-condition 'stop)))
 
 (defun patches ()
  "PATCHES => ALL-PATCHES
index 9bf58d303f84901a02d9317140e66780869cc901..78293e0f3a2a0cc8231d764b0a84e8af17e68b19 100644 (file)
 (defsimplecommandtest "die 1" "crt 10 ask turtles [ die ]"
  "A665C1BF95E1F9CAAE9B9F8B2FBE3DAA45453136")
 
+(defsimplecommandtest "die 2" "crt 10 ask turtles [ hatch 1 die hatch 1 ]"
+ "DFB46C61ACB9A24004FF26B04DCB0AC32E90AA36")
+
 (defreportertestwithsetup "any? 3" "crt 10 ask turtles [ die ]" "any? turtles" "false"
  "A665C1BF95E1F9CAAE9B9F8B2FBE3DAA45453136")