
1 changed files with 34 additions and 0 deletions
@ -0,0 +1,34 @@ |
|||
#!/usr/bin/env python3 |
|||
# -*- coding: utf-8 -*- |
|||
import pytest |
|||
|
|||
from gen_cid import generate_cid |
|||
from gen_cid import utils |
|||
|
|||
|
|||
def resolve_vars_and_funcs_to_cid(vars, funcs): |
|||
header_filename = "data/input/synth_shed/synth_shed.h" |
|||
libclang_path = "/opt/local/libexec/llvm-9.0/lib/libclang.dylib" |
|||
header = generate_cid.parse(libclang_path, header_filename, funcs, vars) |
|||
|
|||
# Debug output |
|||
utils.write_json(header["ast"], header["out_dir"] + "/" + header["filename"] + ".ast.json") |
|||
utils.write_json(header["cid"], header["out_dir"] + "/" + header["filename"] + ".cid.json") |
|||
utils.write_json(header, header["out_dir"] + "/" + header["filename"] + ".header.json") |
|||
|
|||
return header["cid"] |
|||
|
|||
|
|||
|
|||
|
|||
def test_manual(): |
|||
vars = [] |
|||
funcs = [] |
|||
funcs.append("init_synth_shed") |
|||
# funcs.append("synth_create") |
|||
# funcs.append("synth_set_osc_count") |
|||
funcs.append("tech_to_string") |
|||
# funcs.append("filtertype_to_string") |
|||
# funcs.append("play_synth") |
|||
resolve_vars_and_funcs_to_cid(vars, funcs) |
|||
|
Loading…
Reference in new issue