Aion

 view release on metacpan or  search on metacpan

t/aion/type/lim.t  view on Meta::CPAN

use common::sense; use open qw/:std :utf8/;  use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//;  use Test::More 0.98;  use String::Diff q...
# 
# Aion::Type::Lim - граница со смещением для интервалов
# 
# # SYNOPSIS
# 
subtest 'SYNOPSIS' => sub { 
use Aion::Type::Lim;

local ($::_g0 = do {Aion::Type::Lim->from(5)}, $::_e0 = "Closed[5]"); ::ok $::_g0 eq $::_e0, 'Aion::Type::Lim->from(5) # => Closed[5]' or ::diag ::_string_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {Aion::Type::Lim->from(5)->inc}, $::_e0 = "Opened[5]"); ::ok $::_g0 eq $::_e0, 'Aion::Type::Lim->from(5)->inc # => Opened[5]' or ::diag ::_string_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {Aion::Type::Lim->from(5)->dec}, $::_e0 = "Opened[5]"); ::ok $::_g0 eq $::_e0, 'Aion::Type::Lim->from(5)->dec # => Opened[5]' or ::diag ::_string_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;

my $five_min = Aion::Type::Lim->from(5)->dec;
my $five_max = Aion::Type::Lim->from(5)->inc;

local ($::_g0 = do {$five_min == 5}, $::_e0 = do {""}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '$five_min == 5 # -> ""' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {$five_min < 5}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '$five_min < 5 # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
local ($::_g0 = do {$five_max > 5}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '$five_max > 5 # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;

# 
# # DESCRIPTION
# 
# Предназначен для создания открытых границ в `Range[from, to]`.
# 
# Переопределяет оператор сравнения `<=>` из которого выводятся остальные операторы сравнения: `<`, `>`, `<=`, `>=`, `==`, `!=`.
# 
# # SUBROUTINES
# 
# ## from ($cls, $lim)
# 
# Конструктор.
# 
# ## dec ()
# 
# Уменьшает сдвиг.
# 
# ## inc ()
# 
# Увеличивает сдвиг.
# 
# # AUTHOR
# 
# Yaroslav O. Kosmina <dart@cpan.org>
# 
# # LICENSE
# 
# âš– **GPLv3**
# 
# # COPYRIGHT
# 
# The Aion::Type::Lim module is copyright © 2026 Yaroslav O. Kosmina. Rusland. All rights reserved.

	::done_testing;
};

::done_testing;



( run in 0.492 second using v1.01-cache-2.11-cpan-63c85eba8c4 )