Skip to content
Playground(another site)

bynk.test.advance_not_duration

Error An advance Clock by statement's amount is not a Duration.

advance Clock by <amount> moves the harness clock forward by a Duration. A bare number does not say what unit it counts, so it is refused. Write a duration literal such as 5.minutes. See bynk.test.advance_not_clock for naming a capability other than Clock.

Example

demo/clock.bynk
consumes bynk { Clock }
// tests/clock.test.bynk
advance Clock by 5 // ✗ a number, not a Duration
advance Clock by 5.minutes // ✓

In the Book

See also

  • The grammar rule it governs: advance_stmt.
  • Every code in its category, Tests, on the diagnostic index.
  • bynk explain bynk.test.advance_not_duration shows the same from the installed toolchain, without a network.