neo-decompiler 0.8.2

Neo N3 NEF decompiler: parse, disassemble, lift bytecode to high-level pseudocode and C# skeletons, with a CLI, JSON reports, and optional WebAssembly bindings.
Documentation
use super::*;

#[test]
fn test_double_negation() {
    let expr = Expr::unary(
        UnaryOp::LogicalNot,
        Expr::unary(UnaryOp::LogicalNot, Expr::var("x")),
    );
    assert_eq!(simplify(expr), Expr::var("x"));
}

#[test]
fn test_not_true() {
    let expr = Expr::unary(UnaryOp::LogicalNot, Expr::Literal(Literal::Bool(true)));
    assert_eq!(simplify(expr), Expr::Literal(Literal::Bool(false)));
}

#[test]
fn test_not_false() {
    let expr = Expr::unary(UnaryOp::LogicalNot, Expr::Literal(Literal::Bool(false)));
    assert_eq!(simplify(expr), Expr::Literal(Literal::Bool(true)));
}