Update manuals and other additions
This commit is contained in:
@@ -15,8 +15,8 @@ INTEROP = ROOT / "examples" / "interop"
|
||||
|
||||
|
||||
def test_protel_calls_python_emits_external_python_greet():
|
||||
source = (INTEROP / "protel_calls_python.protel").read_text(encoding="utf-8")
|
||||
cpp = transpile_to_cpp(parse_protel(source), source_name="protel_calls_python.protel")
|
||||
source = (INTEROP / "protel_calls_python.P").read_text(encoding="utf-8")
|
||||
cpp = transpile_to_cpp(parse_protel(source), source_name="protel_calls_python.P")
|
||||
assert 'extern "C"' in cpp
|
||||
assert "void python_greet(const char* name, int16_t value)" in cpp
|
||||
assert "python_greet(" in cpp
|
||||
@@ -24,8 +24,8 @@ def test_protel_calls_python_emits_external_python_greet():
|
||||
|
||||
|
||||
def test_protel_for_python_exports_c_linkage():
|
||||
source = (INTEROP / "protel_for_python.protel").read_text(encoding="utf-8")
|
||||
cpp = transpile_to_cpp(parse_protel(source), source_name="protel_for_python.protel")
|
||||
source = (INTEROP / "protel_for_python.P").read_text(encoding="utf-8")
|
||||
cpp = transpile_to_cpp(parse_protel(source), source_name="protel_for_python.P")
|
||||
assert "/* EXPORT protel_add" in cpp
|
||||
assert "int16_t protel_add(int16_t a, int16_t b)" in cpp
|
||||
assert "return (a + b)" in cpp
|
||||
|
||||
Reference in New Issue
Block a user