Refactor WASM bindings in preparation for codegen directory structure update
PiperOrigin-RevId: 829459535 Change-Id: I4045e163a6e7fcee9d9585131d1e5e30f0b50b89
This commit is contained in:
committed by
Copybara-Service
parent
59debb50b1
commit
44220fcc51
@@ -16,7 +16,7 @@ from pathlib import Path
|
||||
|
||||
from absl.testing import absltest
|
||||
|
||||
from wasm.codegen import binding_builder
|
||||
from wasm.codegen import update
|
||||
|
||||
ERROR_MESSAGE = """
|
||||
The file '{}' needs to be updated, please run:
|
||||
@@ -25,17 +25,14 @@ update.py as described in wasm/README.md""".lstrip()
|
||||
|
||||
class BindingsDiffTest(absltest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
||||
def test_bindings_source(self):
|
||||
SCRIPT_DIR = Path(__file__).parent
|
||||
with open(SCRIPT_DIR / 'generated/bindings.cc', 'r') as f:
|
||||
self.generated_src = f.read()
|
||||
self.template_path_cc = SCRIPT_DIR / 'templates/bindings.cc'
|
||||
|
||||
self.builder = binding_builder.BindingBuilder(self.template_path_cc)
|
||||
self.builder = update.BindingBuilder(self.template_path_cc)
|
||||
|
||||
def test_bindings_source(self):
|
||||
generator_output = (
|
||||
self.builder.set_enums().set_structs().set_functions().to_string()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user