finished circuit form
Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
parent
c235f9727f
commit
4b587f11ab
7 changed files with 144 additions and 53 deletions
|
|
@ -160,7 +160,7 @@ mod bool_lib_tests {
|
|||
eval(&change_tree, &mut syms).unwrap();
|
||||
|
||||
if let Ctr::Seg(ref s) = *eval(&check_tree, &mut syms).unwrap() {
|
||||
if let Ctr::Bool(ref b) = *s.car{
|
||||
if let Ctr::Bool(ref b) = *s.car {
|
||||
assert_eq!(false, *b)
|
||||
} else {
|
||||
panic!()
|
||||
|
|
@ -171,7 +171,7 @@ mod bool_lib_tests {
|
|||
|
||||
eval(&change_tree, &mut syms).unwrap();
|
||||
if let Ctr::Seg(ref s) = *eval(&check_tree, &mut syms).unwrap() {
|
||||
if let Ctr::Bool(ref b) = *s.car{
|
||||
if let Ctr::Bool(ref b) = *s.car {
|
||||
assert_eq!(true, *b)
|
||||
} else {
|
||||
panic!()
|
||||
|
|
@ -197,7 +197,10 @@ mod bool_lib_tests {
|
|||
|
||||
eval(&doc_tree, &mut syms).unwrap();
|
||||
if let Err(s) = eval(&change_tree, &mut syms) {
|
||||
assert_eq!(s, "error in call to toggle: can only toggle a boolean".to_string());
|
||||
assert_eq!(
|
||||
s,
|
||||
"error in call to toggle: can only toggle a boolean".to_string()
|
||||
);
|
||||
let intermediate = *eval(&check_tree, &mut syms).unwrap();
|
||||
if let Ctr::Seg(ref s) = intermediate {
|
||||
assert_eq!(s.to_string(), "('oops')".to_string());
|
||||
|
|
@ -227,7 +230,10 @@ mod bool_lib_tests {
|
|||
|
||||
eval(&doc_tree, &mut syms).unwrap();
|
||||
if let Err(s) = eval(&change_tree, &mut syms) {
|
||||
assert_eq!(s, "error in call to toggle: cannot toggle a function".to_string());
|
||||
assert_eq!(
|
||||
s,
|
||||
"error in call to toggle: cannot toggle a function".to_string()
|
||||
);
|
||||
if let Ctr::String(ref s) = *eval(&check_tree, &mut syms).unwrap() {
|
||||
assert_eq!(*s, "1".to_string());
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue