@@ -7363,9 +7363,9 @@ def test2():
7363
7363
'' : (['-lembind' , '-sDYNAMIC_EXECUTION=0' ],),
7364
7364
'flag' : (['--bind' ],),
7365
7365
})
7366
- def test_embind (self , args ):
7366
+ def test_embind_val_basics (self , args ):
7367
7367
self .maybe_closure ()
7368
- create_file ('test_embind .cpp' , r'''
7368
+ create_file ('test .cpp' , r'''
7369
7369
#include <stdio.h>
7370
7370
#include <emscripten/val.h>
7371
7371
@@ -7381,10 +7381,10 @@ def test_embind(self, args):
7381
7381
return 0;
7382
7382
}
7383
7383
''' )
7384
- self .do_runf ('test_embind .cpp' , 'abs(-10): 10\n abs(-11): 11' , emcc_args = args )
7384
+ self .do_runf ('test .cpp' , 'abs(-10): 10\n abs(-11): 11' , emcc_args = args )
7385
7385
7386
7386
@node_pthreads
7387
- def test_embind_2 (self ):
7387
+ def test_embind_basics (self ):
7388
7388
self .maybe_closure ()
7389
7389
self .emcc_args += [
7390
7390
'-lembind' , '--post-js' , 'post.js' ,
@@ -7396,7 +7396,7 @@ def test_embind_2(self):
7396
7396
out('lerp ' + Module['lerp'](100, 200, 66) + '.');
7397
7397
}
7398
7398
''' )
7399
- create_file ('test_embind_2 .cpp' , r'''
7399
+ create_file ('test .cpp' , r'''
7400
7400
#include <stdio.h>
7401
7401
#include <emscripten.h>
7402
7402
#include <emscripten/bind.h>
@@ -7414,9 +7414,9 @@ def test_embind_2(self):
7414
7414
return 0;
7415
7415
}
7416
7416
''' )
7417
- self .do_runf ('test_embind_2 .cpp' , 'lerp 166' )
7417
+ self .do_runf ('test .cpp' , 'lerp 166' )
7418
7418
7419
- def test_embind_3 (self ):
7419
+ def test_embind_unbound_types (self ):
7420
7420
self .emcc_args += ['-lembind' , '--post-js' , 'post.js' ]
7421
7421
create_file ('post.js' , '''
7422
7422
function ready() {
@@ -7427,7 +7427,7 @@ def test_embind_3(self):
7427
7427
}
7428
7428
}
7429
7429
''' )
7430
- create_file ('test_embind_3 .cpp' , r'''
7430
+ create_file ('test .cpp' , r'''
7431
7431
#include <emscripten.h>
7432
7432
#include <emscripten/bind.h>
7433
7433
using namespace emscripten;
@@ -7442,16 +7442,16 @@ def test_embind_3(self):
7442
7442
return 0;
7443
7443
}
7444
7444
''' )
7445
- self .do_runf ('test_embind_3 .cpp' , 'UnboundTypeError: Cannot call compute due to unbound types: Pi' )
7445
+ self .do_runf ('test .cpp' , 'UnboundTypeError: Cannot call compute due to unbound types: Pi' )
7446
7446
7447
- def test_embind_4 (self ):
7447
+ def test_embind_memory_view (self ):
7448
7448
self .emcc_args += ['-lembind' , '--post-js' , 'post.js' ]
7449
7449
create_file ('post.js' , '''
7450
7450
function printFirstElement() {
7451
7451
out(Module['getBufferView']()[0]);
7452
7452
}
7453
7453
''' )
7454
- create_file ('test_embind_4 .cpp' , r'''
7454
+ create_file ('test .cpp' , r'''
7455
7455
#include <emscripten.h>
7456
7456
#include <emscripten/bind.h>
7457
7457
#include <emscripten/val.h>
@@ -7474,35 +7474,30 @@ def test_embind_4(self):
7474
7474
return 0;
7475
7475
}
7476
7476
''' )
7477
- self .do_runf ('test_embind_4 .cpp' , '107' )
7477
+ self .do_runf ('test .cpp' , '107' )
7478
7478
7479
- def test_embind_5 (self ):
7480
- self .do_core_test ('test_embind_5 .cpp' , emcc_args = ['-lembind' ])
7479
+ def test_embind_inheritance (self ):
7480
+ self .do_core_test ('test_embind_inheritance .cpp' , emcc_args = ['-lembind' ])
7481
7481
7482
7482
def test_embind_custom_marshal (self ):
7483
7483
self .emcc_args += ['-lembind' , '--pre-js' , test_file ('embind/test_custom_marshal.js' )]
7484
7484
self .do_run_in_out_file_test ('embind/test_custom_marshal.cpp' , assert_identical = True )
7485
7485
7486
7486
def test_embind_float_constants (self ):
7487
- self .emcc_args += ['-lembind' ]
7488
- self .do_run_in_out_file_test ('embind/test_float_constants.cpp' )
7487
+ self .do_run_in_out_file_test ('embind/test_float_constants.cpp' , emcc_args = ['-lembind' ])
7489
7488
7490
7489
def test_embind_negative_constants (self ):
7491
- self .emcc_args += ['-lembind' ]
7492
- self .do_run_in_out_file_test ('embind/test_negative_constants.cpp' )
7490
+ self .do_run_in_out_file_test ('embind/test_negative_constants.cpp' , emcc_args = ['-lembind' ])
7493
7491
7494
7492
@also_with_wasm_bigint
7495
7493
def test_embind_unsigned (self ):
7496
- self .emcc_args += ['-lembind' ]
7497
- self .do_run_in_out_file_test ('embind/test_unsigned.cpp' )
7494
+ self .do_run_in_out_file_test ('embind/test_unsigned.cpp' , emcc_args = ['-lembind' ])
7498
7495
7499
7496
def test_embind_val (self ):
7500
- self .emcc_args += ['-lembind' ]
7501
- self .do_run_in_out_file_test ('embind/test_val.cpp' )
7497
+ self .do_run_in_out_file_test ('embind/test_val.cpp' , emcc_args = ['-lembind' ])
7502
7498
7503
7499
def test_embind_val_read_pointer (self ):
7504
- self .emcc_args += ['-lembind' ]
7505
- self .do_runf ('embind/test_val_read_pointer.cpp' )
7500
+ self .do_runf ('embind/test_val_read_pointer.cpp' , emcc_args = ['-lembind' ])
7506
7501
7507
7502
def test_embind_val_assignment (self ):
7508
7503
err = self .expect_fail ([EMCC , test_file ('embind/test_val_assignment.cpp' ), '-lembind' , '-c' ])
0 commit comments