From 6e99e391e175269cb5035a3fa18d2a0d88892537 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sat, 3 Dec 2022 10:50:58 +0800 Subject: [PATCH] Fix test. --- tests/comments.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/comments.rs b/tests/comments.rs index 682ac467..3ad7e4ca 100644 --- a/tests/comments.rs +++ b/tests/comments.rs @@ -75,13 +75,16 @@ fn test_comments_doc() -> Result<(), Box> { ", )?; + #[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(