@@ -7637,10 +7637,11 @@ def test_embind(self, args):
7637
7637
})
7638
7638
@node_pthreads
7639
7639
def test_embind_2 (self , args ):
7640
+ self .maybe_closure ()
7640
7641
self .emcc_args += ['-lembind' , '--post-js' , 'post.js' ] + args
7641
7642
create_file ('post.js' , '''
7642
7643
function printLerp() {
7643
- out('lerp ' + Module. lerp(100, 200, 66) + '.');
7644
+ out('lerp ' + Module[' lerp'] (100, 200, 66) + '.');
7644
7645
}
7645
7646
''' )
7646
7647
create_file ('test_embind_2.cpp' , r'''
@@ -7668,7 +7669,7 @@ def test_embind_3(self):
7668
7669
create_file ('post.js' , '''
7669
7670
function ready() {
7670
7671
try {
7671
- Module. compute(new Uint8Array([1,2,3]));
7672
+ Module[' compute'] (new Uint8Array([1,2,3]));
7672
7673
} catch(e) {
7673
7674
out(e);
7674
7675
}
@@ -7695,7 +7696,7 @@ def test_embind_4(self):
7695
7696
self .emcc_args += ['-lembind' , '--post-js' , 'post.js' ]
7696
7697
create_file ('post.js' , '''
7697
7698
function printFirstElement() {
7698
- out(Module. getBufferView()[0]);
7699
+ out(Module[' getBufferView'] ()[0]);
7699
7700
}
7700
7701
''' )
7701
7702
create_file ('test_embind_4.cpp' , r'''
@@ -7779,7 +7780,7 @@ def test_embind_no_rtti(self):
7779
7780
#include <stdio.h>
7780
7781
7781
7782
EM_JS(void, calltest, (), {
7782
- out("dotest returned: " + Module. dotest());
7783
+ out("dotest returned: " + Module[" dotest"] ());
7783
7784
});
7784
7785
7785
7786
int main(int argc, char** argv){
@@ -7811,7 +7812,7 @@ def test_embind_no_rtti_followed_by_rtti(self):
7811
7812
#include <stdio.h>
7812
7813
7813
7814
EM_JS(void, calltest, (), {
7814
- out("dotest returned: " + Module. dotest());
7815
+ out("dotest returned: " + Module[" dotest"] ());
7815
7816
});
7816
7817
7817
7818
int main(int argc, char** argv){
0 commit comments