use super::build_attribute_item;
use crate::syntax::_node_builders::languages::rust::tests_utils::{find_node, rust_ast_graph};
use crate::syntax::core_nodes::Comment;
use alloc::borrow::ToOwned;
const SOURCE: &str = include_str!("attribute_item.test.rs");
#[test]
fn builds_an_attribute_as_a_comment() {
let graph = rust_ast_graph(SOURCE);
let node = find_node(&graph, "attribute_item");
assert_eq!(
build_attribute_item(&graph, node),
Ok(Comment {
value: "#[derive(Debug)]".to_owned(),
})
);
}