|
NAMETest2::Tools::FFI - Tools for testing FFI VERSIONversion 0.06 SYNOPSISIn your t/ffi/test.c: int
mytest()
{
return 42;
}
In your t/mytest.t: use Test2::V0; use Test2::Tools::FFI; is( ffi->test->function( mytest => [] => 'int')->call, 42, ); done_testing; DESCRIPTIONThis Test2 Tools module provide some basic tools for testing FFI modules. FUNCTIONSffi_optionsffi_options %options; This must be run before any "ffi->" functions. Options available:
ffi->runtimemy $ffi = ffi->runtime; Returns a FFI::Platypus instance connected to the runtime for your module. ffi->testmy $ffi = ffi->test; Returns a FFI::Platypus instance connected to the test for your module. ffi->combinedmy $ffi = ffi->combined; Return a FFI::Platypus instance with the combined test and runtime libraries for your module. AUTHORGraham Ollis <plicease@cpan.org> COPYRIGHT AND LICENSEThis software is copyright (c) 2018 by Graham Ollis. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|