1use strict; 2use warnings; 3use Test::More; 4 5# this is needed to avoid false passes if was done first without 'info' 6use Inline CPP => config => force_build => 1, clean_after_build => 0; 7 8use Inline CPP => <<'END'; 9 10struct Fizzle { 11 int q; 12 double foozle; 13 int quack; 14 Fizzle(int Q=0, double Foozle=0, int Quack=0) { 15 q = Q; 16 foozle = Foozle; 17 quack = Quack; 18 } 19 int get_q() { return q; } 20 double get_foozle() { return foozle; } 21 int get_quack() { return quack; } 22}; 23 24END 25 26my $o = new_ok( 'Fizzle' ); 27 28is( 29 $o->get_q, 0, 30 "Struct with public member function." 31); 32 33done_testing(); 34