Permalink
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (46 sloc) 859 Bytes
topic: HysteresisLatch
cases:
-
name: 'input above high threshold'
assertion: 'should go high'
inputs:
lowthreshold: 10
highthreshold: 20
in: 30
expect:
out:
equals: true
-
name: 'input below low threshold'
assertion: 'should go low'
inputs:
lowthreshold: 10
highthreshold: 20
in: 5
expect:
out:
equals: false
-
name: 'in low state, input between thresholds'
assertion: 'should remain low'
inputs:
- { lowthreshold: 10, highthreshold: 20, in: 5 }
- { in: 15 }
expect:
-
out:
equals: false
-
out:
equals: false
-
name: 'in high state, input between thresholds'
assertion: 'should remain high'
inputs:
- { lowthreshold: 10, highthreshold: 20, in: 30 }
- { in: 15 }
expect:
- out:
equals: true
- out:
equals: true