finished circuit form

Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
Ava Hahn 2023-03-03 14:29:53 -08:00
parent c235f9727f
commit 4b587f11ab
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
7 changed files with 144 additions and 53 deletions

View file

@ -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 {