Skip to content

Commit

Permalink
parser test: also test variable-ids
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsippel committed Nov 11, 2023
1 parent bd21a60 commit 0fb3f6e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/test/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ use {

#[test]
fn test_parser_id() {
let mut dict = TypeDict::new();

dict.add_varname("T".into());

assert_eq!(
Ok(TypeTerm::TypeID(TypeID::Var(0))),
dict.parse("T")
);

assert_eq!(
Ok(TypeTerm::TypeID(TypeID::Fun(0))),
TypeDict::new().parse("A")
dict.parse("A")
);
}

Expand Down

0 comments on commit 0fb3f6e

Please sign in to comment.