use super::build_boolean_literal;
use crate::syntax::_node_builders::languages::rust::tests_utils::{find_node, rust_ast_graph};
use crate::syntax::SyntaxNode;
use alloc::borrow::ToOwned;
const SOURCE: &str = include_str!("boolean_literal.test.rs");
#[test]
fn builds_a_bool_literal_from_a_rust_file() {
let graph = rust_ast_graph(SOURCE);
let node = find_node(&graph, "boolean_literal");
assert_eq!(
build_boolean_literal(&graph, node),
Ok(SyntaxNode::Literal {
value: "true".to_owned(),
value_type: "bool".to_owned(),
})
);
}