[OCaml] Re-enable the using_protected unit test
Use the [member-variable] syntax in using_protected_runme.ml as required by the OCaml module's documentation and implementation. Fix the return type for vec_write() in example.h in the OCaml stl example.
This commit is contained in:
parent
96c5a95878
commit
a851e0a9ac
4 changed files with 3 additions and 4 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
double vec_write(std::vector<string> v) {
|
void vec_write(std::vector<string> v) {
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for( std::vector<string>::iterator i = v.begin();
|
for( std::vector<string>::iterator i = v.begin();
|
||||||
i != v.end();
|
i != v.end();
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ nested_directors \
|
||||||
preproc_constants \
|
preproc_constants \
|
||||||
smart_pointer_inherit \
|
smart_pointer_inherit \
|
||||||
typedef_mptr \
|
typedef_mptr \
|
||||||
using_protected \
|
|
||||||
|
|
||||||
FAILING_C_TESTS = \
|
FAILING_C_TESTS = \
|
||||||
enums \
|
enums \
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ open Swig
|
||||||
open Using_protected
|
open Using_protected
|
||||||
|
|
||||||
let f = new_FooBar C_void
|
let f = new_FooBar C_void
|
||||||
let _ = (invoke f) "x" (C_int 3)
|
let _ = (invoke f) "[x]" (C_int 3)
|
||||||
|
|
||||||
let _ = if (invoke f) "blah" (C_int 4) <> (C_int 4) then
|
let _ = if (invoke f) "blah" (C_int 4) <> (C_int 4) then
|
||||||
raise (Failure "blah(int)")
|
raise (Failure "blah(int)")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue