Reorganization of the WASM bindings.cc template
* Move all bindings into a single EMSCRIPTEN_BINDINGS block * Move all auto generated bindings line to the start of the block * Alphabetically sort the constants binding lines PiperOrigin-RevId: 837142009 Change-Id: I218a37dbc0ca6c6f16a455718889c08fe1b41d56
This commit is contained in:
committed by
Copybara-Service
parent
c7e0c01e80
commit
05f194c412
@@ -801,17 +801,14 @@ class EnumsGeneratorTest(absltest.TestCase):
|
||||
def test_generate_enum_bindings(self):
|
||||
|
||||
expected_code = """
|
||||
EMSCRIPTEN_BINDINGS(mujoco_enums) {
|
||||
enum_<AnotherEnum>("AnotherEnum")
|
||||
.value("ALPHA", ALPHA)
|
||||
.value("BETA", BETA);
|
||||
|
||||
enum_<TestEnum>("TestEnum")
|
||||
.value("FIRST_VAL", FIRST_VAL)
|
||||
.value("SECOND_VAL", SECOND_VAL)
|
||||
.value("THIRD_VAL", THIRD_VAL);
|
||||
|
||||
}""".strip()
|
||||
enum_<AnotherEnum>("AnotherEnum")
|
||||
.value("ALPHA", ALPHA)
|
||||
.value("BETA", BETA);
|
||||
enum_<TestEnum>("TestEnum")
|
||||
.value("FIRST_VAL", FIRST_VAL)
|
||||
.value("SECOND_VAL", SECOND_VAL)
|
||||
.value("THIRD_VAL", THIRD_VAL);
|
||||
""".strip()
|
||||
|
||||
markers_and_content = enums.generate([
|
||||
ast_nodes.EnumDecl(
|
||||
|
||||
Reference in New Issue
Block a user