summaryrefslogtreecommitdiff
path: root/lib/bio/test/bio-read.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-11 18:03:00 -0700
committerOri Bernstein <ori@eigenstate.org>2015-09-11 18:03:00 -0700
commitd2a4d99cee1cbff164e6b80560a0930043ba38a4 (patch)
treeea77141cdee3de78b83f31bb504be38d10b312c4 /lib/bio/test/bio-read.myr
parentbcae988a72a65bdc6597b3116a6a247e3df98487 (diff)
downloadmc-d2a4d99cee1cbff164e6b80560a0930043ba38a4.tar.gz
Update BIO tests and bootstrap.
Diffstat (limited to 'lib/bio/test/bio-read.myr')
-rw-r--r--lib/bio/test/bio-read.myr11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/bio/test/bio-read.myr b/lib/bio/test/bio-read.myr
index eafdb4a..2112d42 100644
--- a/lib/bio/test/bio-read.myr
+++ b/lib/bio/test/bio-read.myr
@@ -8,8 +8,8 @@ const main = {
var b
match bio.open("data/datafile", bio.Rd)
- | `std.Some bio: f = bio
- | `std.None: std.fatal(1, "Unable to open data file")
+ | `std.Ok bio: f = bio
+ | `std.Fail m: std.fatal("Unable to open data file: {}", m)
;;
/* read a 4 byte chunk j*/
@@ -40,7 +40,10 @@ const main = {
const r = {f, buf
match bio.read(f, buf)
- | `std.Some b: -> b
- | `std.None: std.put("eof\n")
+ | `std.Some b:
+ -> b
+ | `std.None:
+ std.put("eof\n")
+ -> ""
;;
}