Add convenience methods to CodeBuilder and cleanup some WASM bindings code generation
PiperOrigin-RevId: 827916844 Change-Id: Ie382f2a5af3d7e3ec2c81cde5d6b768835da2365
This commit is contained in:
committed by
Copybara-Service
parent
740afe22b3
commit
4b79a58fa0
@@ -190,8 +190,7 @@ class FunctionUtilsTest(absltest.TestCase):
|
||||
result = functions.generate_function_wrapper(func)
|
||||
self.assertEqual(
|
||||
result,
|
||||
"""int get_id_wrapper()
|
||||
{
|
||||
"""int get_id_wrapper() {
|
||||
return get_id();
|
||||
}""",
|
||||
)
|
||||
@@ -218,8 +217,7 @@ class FunctionUtilsTest(absltest.TestCase):
|
||||
result = functions.generate_function_wrapper(func)
|
||||
self.assertEqual(
|
||||
result,
|
||||
"""int get_id_wrapper(const NumberArray& mat, int nr)
|
||||
{
|
||||
"""int get_id_wrapper(const NumberArray& mat, int nr) {
|
||||
UNPACK_ARRAY(mjtNum, mat);
|
||||
return get_id(mat_.data(), nr);
|
||||
}""",
|
||||
|
||||
Reference in New Issue
Block a user