forked from gentoo-utils/gentoo-utils
impl Parseable trait
This commit is contained in:
@@ -334,14 +334,14 @@ impl fmt::Display for Atom {
|
||||
mod test {
|
||||
use mon::{Parser, input::InputIter};
|
||||
|
||||
use crate::atom::parsers;
|
||||
use super::*;
|
||||
|
||||
use crate::Parseable;
|
||||
|
||||
#[test]
|
||||
fn test_version_display() {
|
||||
let s = "1.0.0_alpha1_beta1-r1";
|
||||
let version = parsers::version()
|
||||
.parse_finished(InputIter::new(s))
|
||||
.unwrap();
|
||||
let version = Version::parser().parse_finished(InputIter::new(s)).unwrap();
|
||||
|
||||
assert_eq!(version.to_string().as_str(), s);
|
||||
}
|
||||
@@ -349,7 +349,7 @@ mod test {
|
||||
#[test]
|
||||
fn test_display_atom() {
|
||||
let s = "!!>=foo/bar-1.0.0v_alpha1_beta1-r1:slot/sub=[a,b,c]";
|
||||
let atom = parsers::atom().parse_finished(InputIter::new(s)).unwrap();
|
||||
let atom = Atom::parser().parse_finished(InputIter::new(s)).unwrap();
|
||||
|
||||
assert_eq!(atom.to_string().as_str(), s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user