Add a test for integer literals.

This commit is contained in:
Tom Alexander 2020-05-10 23:42:56 -04:00
parent 6e6560c742
commit 1b63bc4083
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 23 additions and 2 deletions

View File

@ -919,8 +919,6 @@ mod tests {
);
}
// TODO: Add test for integer literals
#[test]
fn test_quoted_partial() {
assert_eq!(
@ -944,6 +942,29 @@ mod tests {
);
}
#[test]
fn test_literals() {
assert_eq!(
dust_tag(r#"{>foo a="foo" b=179/}"#),
Ok((
"",
DustTag::DTPartial(Partial {
name: "foo".to_owned(),
params: vec![
KVPair {
key: "a",
value: RValue::RVString("foo".to_owned())
},
KVPair {
key: "b",
value: RValue::RVPositiveInteger(179)
}
]
})
))
);
}
#[test]
fn test_helper() {
assert_eq!(