parser test: also test variable-ids
This commit is contained in:
parent
bd21a602f3
commit
0fb3f6e212
1 changed files with 10 additions and 1 deletions
|
@ -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")
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue