summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wasp/boards/simulator/test_smoke.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/wasp/boards/simulator/test_smoke.py b/wasp/boards/simulator/test_smoke.py
index 62d570b..d86b4e7 100644
--- a/wasp/boards/simulator/test_smoke.py
+++ b/wasp/boards/simulator/test_smoke.py
@@ -44,3 +44,24 @@ def test_app(system, name):
for i in range(4):
system.step()
system.switch(system.quick_ring[0])
+
+def test_stopwatch(system):
+ system.switch(system.apps['Timer'])
+
+ system.step()
+
+ wasp.watch.button.value(0)
+ system.step()
+ assert(system.app._started_at > 0)
+ wasp.watch.button.value(1)
+
+ system.step()
+ system.step()
+ system.step()
+
+ wasp.watch.button.value(0)
+ system.step()
+ assert(system.app._started_at == 0)
+ wasp.watch.button.value(1)
+
+ system.step()