fluidattacks-blends-domain 0.41.0

Blends functional core: pure AST graph to syntax graph (no_std)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::build_boolean_literal;
use crate::syntax::_node_builders::languages::rust::tests_utils::{find_node, rust_ast_graph};
use crate::syntax::core_nodes::BoolLiteral;

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");
    let built = build_boolean_literal(&graph, node).unwrap();
    assert_eq!(built, BoolLiteral { value: true });
}