TritonVM / tasm-lib

A collection of functions written in Triton VM assembly (tasm)
Apache License 2.0
11 stars 2 forks source link

Add test to verify that `exported_snippets` structure is correct #76

Open Sword-Smith opened 9 months ago

Sword-Smith commented 9 months ago

The LHS of the match arms should be entrypoint for the various snippets we want to export. We have a lot of spelling error, and this file is hard to maintain. How can we add a test such that we verify correspondence between the strings in name_to_snippet and the actualy entrypoint strings?

pub fn name_to_snippet(fn_name: &str) -> Box<dyn BasicSnippet> {
    match fn_name {
        // u32
        "tasm_arithmetic_u32_isodd" => Box::new(Isodd),
        "tasm_arithmetic_u32_isu32" => Box::new(Isu32),
        "tasm_arithmetic_u32_safeadd" => Box::new(Safeadd),