class TestCase::Operator::Move {
use TestCase::Point_3b;
use TestCase::Point_3s;
use TestCase::Point_3i;
use TestCase::Point_3l;
use TestCase::Point_3f;
use TestCase::Point_3d;
use Point;
use Point3D;
static method move_constant_byte : int () {
my $value : byte = 'a';
unless ($value == 'a') {
return 0;
}
return 1;
}
static method move_constant_int : int () {
my $value : int = -2147483648;
unless ($value == -2147483648) {
return 0;
}
return 1;
}
static method move_constant_long : int () {
my $value : long = -9223372036854775808L;
unless ($value == -9223372036854775808L) {
return 0;
}
return 1;
}
static method move_constant_float : int () {
my $value : float = 1.5f;
unless ($value == 1.5f) {
return 0;
}
return 1;
}
static method move_constant_double : int () {
my $value : double = 2147483648.5;
unless ($value == 2147483648.5) {
return 0;
}
return 1;
}
static method move_byte : int () {
my $value : byte = 'a';
my $value2 = $value;
unless ($value2 == 'a') {
return 0;
}
return 1;
}
static method move_short : int () {
my $value : short = -32768;
my $value2 = $value;
unless ($value2 == -32768) {
return 0;
}
return 1;
}
static method move_int : int () {
my $value : int = -2147483648;
my $value2 = $value;
unless ($value2 == -2147483648) {
return 0;
}
return 1;
}
static method move_long : int () {
my $value : long = -9223372036854775808L;
my $value2 = $value;
unless ($value2 == -9223372036854775808L) {
return 0;
}
return 1;
}
static method move_float : int () {
my $value : float = 1.5f;
my $value2 = $value;
unless ($value2 == 1.5f) {
return 0;
}
return 1;
}
static method move_double : int () {
my $value : double = 2147483648.5;
my $value2 = $value;
unless ($value2 == 2147483648.5) {
return 0;
}
return 1;
}
static method move_object : int () {
{
my $value : object = Int->new(1);
my $value2 = $value;
unless ($value2 == $value) {
return 0;
}
}
{
my $value : object = undef;
unless ($value == undef) {
return 0;
}
}
{
my $value : object = Int->new(1);
$value = undef;
unless ($value == undef) {
return 0;
}
}
{
my $value = Point3D->new;
my $value2 = (Point)$value;
my $value3 = (Point3D)$value;
unless ($value3 == $value) {
return 0;
}
}
{
my $value = Point->new;
my $value2 = (object)$value;
my $value3 : object;
eval { $value3 = (Point3D)$value; };
unless ($@) {
return 0;
}
}
{
my $value = copy "abc";
my $value2 = (mutable string)$value;
unless ($value2 == $value) {
return 0;
}
}
{
my $value = "abc";
my $value2 : mutable string;
eval { $value2 = (mutable string)$value; };
unless ($@) {
return 0;
}
}
$@ = undef;
return 1;
}
static method move_ref : int () {
my $value : double = 2147483648.5;
my $value_ref = \$value;
my $value_ref2 = $value_ref;
unless ($$value_ref2 == 2147483648.5) {
return 0;
}
return 1;
}
}