File tree Expand file tree Collapse file tree
src/test/scala/org/nlogo/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class ButtonTests extends TestModels {
2727 ).contains(model.name))
2828 }.par.toMap
2929
30- def run (model : Model , button : Button ): Try [World ] = Try {
30+ private def run (model : Model , button : Button ): Try [Double ] = Try {
3131 withWorkspace(model) { ws =>
3232 button.source.foreach { source =>
3333 val code = button.buttonKind match {
@@ -49,7 +49,7 @@ class ButtonTests extends TestModels {
4949 .filterNot(_.getMessage.endsWith(" You can't get user input headless." ))
5050 .foreach(throw _)
5151 }
52- ws.world
52+ ws.world.ticks
5353 }
5454 }
5555
@@ -74,7 +74,7 @@ class ButtonTests extends TestModels {
7474 modelButtons <- buttons.get(model)
7575 if modelButtons.exists(_.disableUntilTicksStart)
7676 enabledButtons = modelButtons.filterNot(_.disableUntilTicksStart)
77- if ! enabledButtons.exists(b => run(model, b).filter(_.ticks != - 1 ).isSuccess)
77+ if ! enabledButtons.exists(b => run(model, b).filter(_ != - 1 ).isSuccess)
7878 } yield " "
7979 }
8080}
You can’t perform that action at this time.
0 commit comments