Closes #909
This commit is contained in:
parent
14903f7352
commit
2f61f59b60
|
@ -1128,10 +1128,16 @@ impl Assertion<UntypedExpr> {
|
||||||
.to_string()
|
.to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// head did not map to a constant
|
||||||
if self.head.is_err() {
|
if self.head.is_err() {
|
||||||
return red("program failed");
|
return red("program failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// any value in tail did not map to a constant
|
||||||
|
if self.tail.is_err() {
|
||||||
|
return red("program failed");
|
||||||
|
}
|
||||||
|
|
||||||
fn fmt_side(side: &UntypedExpr, stream: Stream) -> String {
|
fn fmt_side(side: &UntypedExpr, stream: Stream) -> String {
|
||||||
let __ = "│".if_supports_color(stream, |s| s.red());
|
let __ = "│".if_supports_color(stream, |s| s.red());
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# This file was generated by Aiken
|
||||||
|
# You typically do not need to edit this file
|
||||||
|
|
||||||
|
[[requirements]]
|
||||||
|
name = "aiken-lang/stdlib"
|
||||||
|
version = "main"
|
||||||
|
source = "github"
|
||||||
|
|
||||||
|
[[packages]]
|
||||||
|
name = "aiken-lang/stdlib"
|
||||||
|
version = "main"
|
||||||
|
requirements = []
|
||||||
|
source = "github"
|
||||||
|
|
||||||
|
[etags]
|
||||||
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1715006768, nanos_since_epoch = 293270000 }, "5ee55dc5ccf269bb493f4cacb32096f0191a6adb2ef39d62a1f79b8c5a8fcc7f"]
|
|
@ -0,0 +1,14 @@
|
||||||
|
name = "aiken-lang/102"
|
||||||
|
version = "0.0.0"
|
||||||
|
license = "Apache-2.0"
|
||||||
|
description = "Aiken contracts for project 'aiken-lang/102'"
|
||||||
|
|
||||||
|
[repository]
|
||||||
|
user = "aiken-lang"
|
||||||
|
project = "102"
|
||||||
|
platform = "github"
|
||||||
|
|
||||||
|
[[dependencies]]
|
||||||
|
name = "aiken-lang/stdlib"
|
||||||
|
version = "main"
|
||||||
|
source = "github"
|
|
@ -0,0 +1,11 @@
|
||||||
|
test panic_aiken() {
|
||||||
|
and {
|
||||||
|
True,
|
||||||
|
should_fail(1),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn should_fail(num) {
|
||||||
|
expect num == 0
|
||||||
|
True
|
||||||
|
}
|
Loading…
Reference in New Issue