Created
October 26, 2017 14:21
-
-
Save christianromney/f557c2454fed3221e38fb6bb9c7943ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './amb.rb' | |
$reported = false | |
def report(a, b) | |
puts "a: #{a}, b: #{b}" | |
unless $reported | |
puts "Press any key to continue..." | |
gets | |
$reported = true | |
end | |
end | |
begin | |
a = amb 1, 2, 3, 4, 5 # pick one of these numbers | |
b = amb 1, 2, 3, 4, 5 # pick one of these numbers | |
report a, b unless $reported | |
# lets make assertions about a and b | |
assert! a > 2 | |
assert! a < b | |
assert! b.odd? | |
# lets print a and b again | |
report a, b | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment