Convert-Binary-C

 view release on metacpan or  search on metacpan

tests/215_local.t  view on Meta::CPAN

################################################################################
#
# Copyright (c) 2002-2024 Marcus Holland-Moritz. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
################################################################################

use Test;
use Convert::Binary::C @ARGV;

$^W = 1;

BEGIN {
  plan tests => 9;
}

my $CCCFG = require './tests/include/config.pl';

eval {
  $c = Convert::Binary::C->new;
};
ok($@,'',"failed to create Convert::Binary::C::Cached object");

eval {
  $c->parse( <<'ENDC' );

enum Zoo {
  APE, BEAR
};

static int a = 23;

static int test( int abc )
{
  int x, y;

  y = abc;
  x = y * y;

  return x;
}

static void foo( void )
{
  enum Bar {
    FOO, BAR
  } xxx;

  typedef enum _foo foo;

  struct _bar {
    int test;
    struct _bar *xxx;
  };

  {
    enum Bar;
    struct _bar;
  }
}

typedef unsigned long u_32;

static void bar( void )
{
  enum Bar {
    BAR, FOO
  } xxx;

  typedef enum _foo foo;

  struct _bar {
    int test;
    struct _bar *xxx;
  };
}



( run in 3.997 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )