### ----------------------------------------------------
### -- Raylib::Bindings
### -- Licenses: Artistic-2.0
### -- Authors: Dan Vu (vushu)
### -- File: t/02-extern.rakutest
### ----------------------------------------------------
use Test;

use lib 'lib';

use Raylib::Grammar;

plan 1;
my $parser = RaylibGrammar.new;

my $code = q:to/END/;
#define RAYLIB_VERSION  "4.6-dev"

// Some compilers (mostly macos clang) default to C++98,
// where aggregate initialization can't be used
// So, give a more clear error stating how to fix this
#if !defined(_MSC_VER) && (defined(__cplusplus) && __cplusplus < 201103L)
    #error "C++11 or later is required. Add -std=c++11"
#endif


#ifndef Test
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif

RLAPI const char *TextFormat(const char *text, ...);                                        // Text formatting with variables (sprintf() style)
END


ok $parser.parse($code), 'Parsing extern rule ';
done-testing;


