GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test2::Tools::FFI(3) User Contributed Perl Documentation Test2::Tools::FFI(3)

Test2::Tools::FFI - Tools for testing FFI

version 0.06

In 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;

This Test2 Tools module provide some basic tools for testing FFI modules.

 ffi_options %options;

This must be run before any "ffi->" functions. Options available:

The FFI::Platypus api level. Zero (0) by default for backward compat, but it is recommended that you use One (1).

 my $ffi = ffi->runtime;

Returns a FFI::Platypus instance connected to the runtime for your module.

 my $ffi = ffi->test;

Returns a FFI::Platypus instance connected to the test for your module.

 my $ffi = ffi->combined;

Return a FFI::Platypus instance with the combined test and runtime libraries for your module.

Graham Ollis <plicease@cpan.org>

This 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.

2021-06-15 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.