use lib "t/lib";

use strict;
use warnings;
use utf8;
use FindBin;

use lib "$FindBin::Bin/lib";

use TestUtil qw(compile_ok_file compile_ok compile_not_ok_file compile_not_ok);

use Test::More;

# Array of any object - object[]
{
  compile_not_ok_file('CompileError::OArray::AssignNumeric');
  compile_not_ok_file('CompileError::OArray::AssignNumericArray');
}

# String
{
  compile_not_ok_file('CompileError::String::CharacterAssign');
  compile_not_ok_file('CompileError::String::AssignNonMutableToMutable');
}

# Bool
{
  compile_ok_file('CompileError::Bool::NotNumericObject');
}
{
  compile_not_ok_file('CompileError::InvalidType');
}

{
  compile_not_ok_file('CompileError::TypeCantBeDetectedUndef');
}

{
  compile_not_ok_file('CompileError::TypeCantBeDetectedUndefDefault');
}

# Type
{
  compile_not_ok_file('CompileError::Type::MutableNoStringCaseStringArray');
  compile_not_ok_file('CompileError::Type::MutableNoStringCaseInt');
  compile_not_ok_file('CompileError::Type::MultiDimensionalAnyObject', qr/Multi dimensional array of any object/i);
}

# Generic type
{
  compile_not_ok_file('CompileError::GenericType::NotExistType', qr/NotExists::XXXX/);
}


done_testing;
