Fix test.

This commit is contained in:
Stephen Chung 2022-12-03 10:50:58 +08:00
parent 09272d08e9
commit 6e99e391e1

View File

@ -75,13 +75,16 @@ fn test_comments_doc() -> Result<(), Box<EvalAltResult>> {
",
)?;
#[cfg(not(feature = "no_position"))]
assert_eq!(
ast.iter_functions().next().unwrap().comments[0],
#[cfg(feature = "no_position")]
"/** Hello world\n ** how are you?\n **/",
#[cfg(not(feature = "no_position"))]
"/** Hello world\n** how are you?\n**/"
);
#[cfg(feature = "no_position")]
assert_eq!(
ast.iter_functions().next().unwrap().comments[0],
"/** Hello world\n ** how are you?\n **/",
);
assert!(engine
.compile(