Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rutefig committed Aug 30, 2024
1 parent 1c6b55a commit 835d20b
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,34 +118,22 @@ mod test {
let signal_decl = lang::StatementsParser::new()
.parse(&debug_sym_ref_factory, "signal a: field, b, c;")
.unwrap();
assert_eq!(
format!("{:?}", signal_decl),
r#"[signal a, b, c;]"#
);
assert_eq!(format!("{:?}", signal_decl), r#"[signal a, b, c;]"#);

let typed_signal_decl = lang::StatementsParser::new()
.parse(&debug_sym_ref_factory, "signal a: field;")
.unwrap();
assert_eq!(
format!("{:?}", typed_signal_decl),
r#"[signal a;]"#
);
assert_eq!(format!("{:?}", typed_signal_decl), r#"[signal a;]"#);

let var_decl = lang::StatementsParser::new()
.parse(&debug_sym_ref_factory, "var a: field, b, c;")
.unwrap();
assert_eq!(
format!("{:?}", var_decl),
r#"[var a, b, c;]"#
);
assert_eq!(format!("{:?}", var_decl), r#"[var a, b, c;]"#);

let signal_array_decl = lang::StatementsParser::new()
.parse(&debug_sym_ref_factory, "signal a[7];")
.unwrap();
assert_eq!(
format!("{:?}", signal_array_decl),
r#"[signal a[7];]"#
);
assert_eq!(format!("{:?}", signal_array_decl), r#"[signal a[7];]"#);

let signal_typed_array_decl = lang::StatementsParser::new()
.parse(&debug_sym_ref_factory, "signal a: field[7];")
Expand All @@ -158,10 +146,7 @@ mod test {
let var_array_decl = lang::StatementsParser::new()
.parse(&debug_sym_ref_factory, "var a[7];")
.unwrap();
assert_eq!(
format!("{:?}", var_array_decl),
r#"[var a[7];]"#
);
assert_eq!(format!("{:?}", var_array_decl), r#"[var a[7];]"#);
}

#[test]
Expand Down

0 comments on commit 835d20b

Please sign in to comment.