|
@@ -3,13 +3,12 @@
|
|
* Company: Lynar Studios
|
|
* Company: Lynar Studios
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
* Created: 2020-08-17
|
|
* Created: 2020-08-17
|
|
- * Changed: 2022-05-05
|
|
|
|
|
|
+ * Changed: 2022-05-06
|
|
*
|
|
*
|
|
* */
|
|
* */
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
#include <gtest/gtest.h>
|
|
#include <ls_std/ls_std.hpp>
|
|
#include <ls_std/ls_std.hpp>
|
|
-#include <TestHelper.hpp>
|
|
|
|
|
|
|
|
namespace
|
|
namespace
|
|
{
|
|
{
|
|
@@ -32,8 +31,8 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_assignment_with_reference)
|
|
TEST_F(LongTest, operator_assignment_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{13};
|
|
|
|
- ls::Long y{3};
|
|
|
|
|
|
+ ls::std::boxing::Long x{13};
|
|
|
|
+ ls::std::boxing::Long y{3};
|
|
x = y;
|
|
x = y;
|
|
|
|
|
|
ASSERT_EQ(3, x);
|
|
ASSERT_EQ(3, x);
|
|
@@ -41,7 +40,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_assignment_with_value)
|
|
TEST_F(LongTest, operator_assignment_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{13};
|
|
|
|
|
|
+ ls::std::boxing::Long x{13};
|
|
x = (ls::long_type) 3;
|
|
x = (ls::long_type) 3;
|
|
|
|
|
|
ASSERT_EQ(3, x);
|
|
ASSERT_EQ(3, x);
|
|
@@ -51,8 +50,8 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_negative)
|
|
TEST_F(LongTest, operator_negative)
|
|
{
|
|
{
|
|
- ls::Long x{13};
|
|
|
|
- ls::Long y{-13};
|
|
|
|
|
|
+ ls::std::boxing::Long x{13};
|
|
|
|
+ ls::std::boxing::Long y{-13};
|
|
|
|
|
|
ASSERT_EQ(-13, -x);
|
|
ASSERT_EQ(-13, -x);
|
|
ASSERT_EQ(13, -y);
|
|
ASSERT_EQ(13, -y);
|
|
@@ -60,57 +59,57 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_add_with_reference)
|
|
TEST_F(LongTest, operator_add_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{13};
|
|
|
|
- ls::Long y{7};
|
|
|
|
|
|
+ ls::std::boxing::Long x{13};
|
|
|
|
+ ls::std::boxing::Long y{7};
|
|
|
|
|
|
ASSERT_EQ(20, x + y);
|
|
ASSERT_EQ(20, x + y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_add_with_value)
|
|
TEST_F(LongTest, operator_add_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{13};
|
|
|
|
|
|
+ ls::std::boxing::Long x{13};
|
|
ASSERT_EQ(20, x + (ls::long_type) 7);
|
|
ASSERT_EQ(20, x + (ls::long_type) 7);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_mul_with_reference)
|
|
TEST_F(LongTest, operator_mul_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{3};
|
|
|
|
- ls::Long y{7};
|
|
|
|
|
|
+ ls::std::boxing::Long x{3};
|
|
|
|
+ ls::std::boxing::Long y{7};
|
|
|
|
|
|
ASSERT_EQ(21, x * y);
|
|
ASSERT_EQ(21, x * y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_mul_with_value)
|
|
TEST_F(LongTest, operator_mul_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{3};
|
|
|
|
|
|
+ ls::std::boxing::Long x{3};
|
|
ASSERT_EQ(21, x * (ls::long_type) 7);
|
|
ASSERT_EQ(21, x * (ls::long_type) 7);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_sub_with_reference)
|
|
TEST_F(LongTest, operator_sub_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{51};
|
|
|
|
- ls::Long y{17};
|
|
|
|
|
|
+ ls::std::boxing::Long x{51};
|
|
|
|
+ ls::std::boxing::Long y{17};
|
|
|
|
|
|
ASSERT_EQ(34, x - y);
|
|
ASSERT_EQ(34, x - y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_sub_with_value)
|
|
TEST_F(LongTest, operator_sub_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{51};
|
|
|
|
|
|
+ ls::std::boxing::Long x{51};
|
|
ASSERT_EQ(34, x - (ls::long_type) 17);
|
|
ASSERT_EQ(34, x - (ls::long_type) 17);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_div_with_reference)
|
|
TEST_F(LongTest, operator_div_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{81};
|
|
|
|
- ls::Long y{9};
|
|
|
|
|
|
+ ls::std::boxing::Long x{81};
|
|
|
|
+ ls::std::boxing::Long y{9};
|
|
|
|
|
|
ASSERT_EQ(9, x / y);
|
|
ASSERT_EQ(9, x / y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_div_with_value)
|
|
TEST_F(LongTest, operator_div_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{81};
|
|
|
|
|
|
+ ls::std::boxing::Long x{81};
|
|
ASSERT_EQ(9, x / (ls::long_type) 9);
|
|
ASSERT_EQ(9, x / (ls::long_type) 9);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -119,8 +118,8 @@ namespace
|
|
EXPECT_THROW({
|
|
EXPECT_THROW({
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- ls::Long x{9};
|
|
|
|
- ls::Long y{0};
|
|
|
|
|
|
+ ls::std::boxing::Long x{9};
|
|
|
|
+ ls::std::boxing::Long y{0};
|
|
|
|
|
|
x = x / y;
|
|
x = x / y;
|
|
} catch (const ls::IllegalArithmeticOperationException &_exception)
|
|
} catch (const ls::IllegalArithmeticOperationException &_exception)
|
|
@@ -135,7 +134,7 @@ namespace
|
|
EXPECT_THROW({
|
|
EXPECT_THROW({
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- ls::Long x{9};
|
|
|
|
|
|
+ ls::std::boxing::Long x{9};
|
|
x = x / (ls::long_type) 0;
|
|
x = x / (ls::long_type) 0;
|
|
} catch (const ls::IllegalArithmeticOperationException &_exception)
|
|
} catch (const ls::IllegalArithmeticOperationException &_exception)
|
|
{
|
|
{
|
|
@@ -146,15 +145,15 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_mod_with_reference)
|
|
TEST_F(LongTest, operator_mod_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{85};
|
|
|
|
- ls::Long y{9};
|
|
|
|
|
|
+ ls::std::boxing::Long x{85};
|
|
|
|
+ ls::std::boxing::Long y{9};
|
|
|
|
|
|
ASSERT_EQ(4, x % y);
|
|
ASSERT_EQ(4, x % y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_mod_with_value)
|
|
TEST_F(LongTest, operator_mod_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{85};
|
|
|
|
|
|
+ ls::std::boxing::Long x{85};
|
|
ASSERT_EQ(4, x % (ls::long_type) 9);
|
|
ASSERT_EQ(4, x % (ls::long_type) 9);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -162,8 +161,8 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_add_equals_with_reference)
|
|
TEST_F(LongTest, operator_add_equals_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{4};
|
|
|
|
- ls::Long y{2};
|
|
|
|
|
|
+ ls::std::boxing::Long x{4};
|
|
|
|
+ ls::std::boxing::Long y{2};
|
|
x += y;
|
|
x += y;
|
|
|
|
|
|
ASSERT_EQ(6, x);
|
|
ASSERT_EQ(6, x);
|
|
@@ -171,7 +170,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_add_equals_with_value)
|
|
TEST_F(LongTest, operator_add_equals_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{4};
|
|
|
|
|
|
+ ls::std::boxing::Long x{4};
|
|
x += (ls::long_type) 2;
|
|
x += (ls::long_type) 2;
|
|
|
|
|
|
ASSERT_EQ(6, x);
|
|
ASSERT_EQ(6, x);
|
|
@@ -179,8 +178,8 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_sub_equals_with_reference)
|
|
TEST_F(LongTest, operator_sub_equals_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{14};
|
|
|
|
- ls::Long y{2};
|
|
|
|
|
|
+ ls::std::boxing::Long x{14};
|
|
|
|
+ ls::std::boxing::Long y{2};
|
|
x -= y;
|
|
x -= y;
|
|
|
|
|
|
ASSERT_EQ(12, x);
|
|
ASSERT_EQ(12, x);
|
|
@@ -188,7 +187,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_sub_equals_with_value)
|
|
TEST_F(LongTest, operator_sub_equals_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{14};
|
|
|
|
|
|
+ ls::std::boxing::Long x{14};
|
|
x -= (ls::long_type) 2;
|
|
x -= (ls::long_type) 2;
|
|
|
|
|
|
ASSERT_EQ(12, x);
|
|
ASSERT_EQ(12, x);
|
|
@@ -196,8 +195,8 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_mul_equals_with_reference)
|
|
TEST_F(LongTest, operator_mul_equals_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{6};
|
|
|
|
- ls::Long y{3};
|
|
|
|
|
|
+ ls::std::boxing::Long x{6};
|
|
|
|
+ ls::std::boxing::Long y{3};
|
|
x *= y;
|
|
x *= y;
|
|
|
|
|
|
ASSERT_EQ(18, x);
|
|
ASSERT_EQ(18, x);
|
|
@@ -205,7 +204,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_mul_equals_with_value)
|
|
TEST_F(LongTest, operator_mul_equals_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{6};
|
|
|
|
|
|
+ ls::std::boxing::Long x{6};
|
|
x *= (ls::long_type) 3;
|
|
x *= (ls::long_type) 3;
|
|
|
|
|
|
ASSERT_EQ(18, x);
|
|
ASSERT_EQ(18, x);
|
|
@@ -213,8 +212,8 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_div_equals_with_reference)
|
|
TEST_F(LongTest, operator_div_equals_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
- ls::Long y{3};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
|
|
+ ls::std::boxing::Long y{3};
|
|
x /= y;
|
|
x /= y;
|
|
|
|
|
|
ASSERT_EQ(4, x);
|
|
ASSERT_EQ(4, x);
|
|
@@ -222,7 +221,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_div_equals_with_value)
|
|
TEST_F(LongTest, operator_div_equals_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
x /= (ls::long_type) 3;
|
|
x /= (ls::long_type) 3;
|
|
|
|
|
|
ASSERT_EQ(4, x);
|
|
ASSERT_EQ(4, x);
|
|
@@ -233,8 +232,8 @@ namespace
|
|
EXPECT_THROW({
|
|
EXPECT_THROW({
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- ls::Long x{9};
|
|
|
|
- ls::Long y{0};
|
|
|
|
|
|
+ ls::std::boxing::Long x{9};
|
|
|
|
+ ls::std::boxing::Long y{0};
|
|
|
|
|
|
x = x /= y;
|
|
x = x /= y;
|
|
} catch (const ls::IllegalArithmeticOperationException &_exception)
|
|
} catch (const ls::IllegalArithmeticOperationException &_exception)
|
|
@@ -249,7 +248,7 @@ namespace
|
|
EXPECT_THROW({
|
|
EXPECT_THROW({
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- ls::Long x{9};
|
|
|
|
|
|
+ ls::std::boxing::Long x{9};
|
|
x = x /= (ls::long_type) 0;
|
|
x = x /= (ls::long_type) 0;
|
|
} catch (const ls::IllegalArithmeticOperationException &_exception)
|
|
} catch (const ls::IllegalArithmeticOperationException &_exception)
|
|
{
|
|
{
|
|
@@ -262,87 +261,87 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_equals_with_reference)
|
|
TEST_F(LongTest, operator_equals_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
- ls::Long y{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
|
|
+ ls::std::boxing::Long y{12};
|
|
|
|
|
|
ASSERT_TRUE(x == y);
|
|
ASSERT_TRUE(x == y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_equals_with_value)
|
|
TEST_F(LongTest, operator_equals_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
ASSERT_TRUE(x == (ls::long_type) 12);
|
|
ASSERT_TRUE(x == (ls::long_type) 12);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_not_equals_with_reference)
|
|
TEST_F(LongTest, operator_not_equals_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
- ls::Long y{3};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
|
|
+ ls::std::boxing::Long y{3};
|
|
|
|
|
|
ASSERT_TRUE(x != y);
|
|
ASSERT_TRUE(x != y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_not_equals_with_value)
|
|
TEST_F(LongTest, operator_not_equals_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
ASSERT_TRUE(x != (ls::long_type) 3);
|
|
ASSERT_TRUE(x != (ls::long_type) 3);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_greater_than_with_reference)
|
|
TEST_F(LongTest, operator_greater_than_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
- ls::Long y{3};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
|
|
+ ls::std::boxing::Long y{3};
|
|
|
|
|
|
ASSERT_TRUE(x > y);
|
|
ASSERT_TRUE(x > y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_greater_than_with_value)
|
|
TEST_F(LongTest, operator_greater_than_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
ASSERT_TRUE(x > (ls::long_type) 3);
|
|
ASSERT_TRUE(x > (ls::long_type) 3);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_greater_than_equals_with_reference)
|
|
TEST_F(LongTest, operator_greater_than_equals_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
- ls::Long y{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
|
|
+ ls::std::boxing::Long y{12};
|
|
|
|
|
|
ASSERT_TRUE(x >= y);
|
|
ASSERT_TRUE(x >= y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_greater_than_equals_with_value)
|
|
TEST_F(LongTest, operator_greater_than_equals_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{12};
|
|
ASSERT_TRUE(x >= (ls::long_type) 12);
|
|
ASSERT_TRUE(x >= (ls::long_type) 12);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_less_than_with_reference)
|
|
TEST_F(LongTest, operator_less_than_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{10};
|
|
|
|
- ls::Long y{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{10};
|
|
|
|
+ ls::std::boxing::Long y{12};
|
|
|
|
|
|
ASSERT_TRUE(x < y);
|
|
ASSERT_TRUE(x < y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_less_than_with_value)
|
|
TEST_F(LongTest, operator_less_than_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{10};
|
|
|
|
- ls::Long y{12};
|
|
|
|
|
|
+ ls::std::boxing::Long x{10};
|
|
|
|
+ ls::std::boxing::Long y{12};
|
|
|
|
|
|
ASSERT_TRUE(x < (ls::long_type) 12);
|
|
ASSERT_TRUE(x < (ls::long_type) 12);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_less_than_equals_with_reference)
|
|
TEST_F(LongTest, operator_less_than_equals_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{10};
|
|
|
|
- ls::Long y{10};
|
|
|
|
|
|
+ ls::std::boxing::Long x{10};
|
|
|
|
+ ls::std::boxing::Long y{10};
|
|
|
|
|
|
ASSERT_TRUE(x <= y);
|
|
ASSERT_TRUE(x <= y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_less_than_equals_with_value)
|
|
TEST_F(LongTest, operator_less_than_equals_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{10};
|
|
|
|
|
|
+ ls::std::boxing::Long x{10};
|
|
ASSERT_TRUE(x <= (ls::long_type) 10);
|
|
ASSERT_TRUE(x <= (ls::long_type) 10);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -350,47 +349,47 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_negation)
|
|
TEST_F(LongTest, operator_negation)
|
|
{
|
|
{
|
|
- ls::Long x{};
|
|
|
|
|
|
+ ls::std::boxing::Long x{};
|
|
ASSERT_TRUE(!x);
|
|
ASSERT_TRUE(!x);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_and_with_reference)
|
|
TEST_F(LongTest, operator_and_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{1};
|
|
|
|
- ls::Long y{1};
|
|
|
|
|
|
+ ls::std::boxing::Long x{1};
|
|
|
|
+ ls::std::boxing::Long y{1};
|
|
|
|
|
|
ASSERT_TRUE(x && y);
|
|
ASSERT_TRUE(x && y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_and_with_value)
|
|
TEST_F(LongTest, operator_and_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{1};
|
|
|
|
|
|
+ ls::std::boxing::Long x{1};
|
|
ASSERT_TRUE(x && (ls::long_type) 1);
|
|
ASSERT_TRUE(x && (ls::long_type) 1);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_and_with_boolean)
|
|
TEST_F(LongTest, operator_and_with_boolean)
|
|
{
|
|
{
|
|
- ls::Long x{1};
|
|
|
|
|
|
+ ls::std::boxing::Long x{1};
|
|
ASSERT_TRUE(x && true);
|
|
ASSERT_TRUE(x && true);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_or_with_reference)
|
|
TEST_F(LongTest, operator_or_with_reference)
|
|
{
|
|
{
|
|
- ls::Long x{};
|
|
|
|
- ls::Long y{1};
|
|
|
|
|
|
+ ls::std::boxing::Long x{};
|
|
|
|
+ ls::std::boxing::Long y{1};
|
|
|
|
|
|
ASSERT_TRUE(x || y);
|
|
ASSERT_TRUE(x || y);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_or_with_value)
|
|
TEST_F(LongTest, operator_or_with_value)
|
|
{
|
|
{
|
|
- ls::Long x{};
|
|
|
|
|
|
+ ls::std::boxing::Long x{};
|
|
ASSERT_TRUE(x || (ls::long_type) 1);
|
|
ASSERT_TRUE(x || (ls::long_type) 1);
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, operator_or_with_boolean)
|
|
TEST_F(LongTest, operator_or_with_boolean)
|
|
{
|
|
{
|
|
- ls::Long x{};
|
|
|
|
|
|
+ ls::std::boxing::Long x{};
|
|
ASSERT_TRUE(x || true);
|
|
ASSERT_TRUE(x || true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -398,7 +397,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_increment)
|
|
TEST_F(LongTest, operator_increment)
|
|
{
|
|
{
|
|
- ls::Long x{};
|
|
|
|
|
|
+ ls::std::boxing::Long x{};
|
|
++x;
|
|
++x;
|
|
|
|
|
|
ASSERT_EQ(1, x);
|
|
ASSERT_EQ(1, x);
|
|
@@ -406,7 +405,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, operator_decrement)
|
|
TEST_F(LongTest, operator_decrement)
|
|
{
|
|
{
|
|
- ls::Long x{};
|
|
|
|
|
|
+ ls::std::boxing::Long x{};
|
|
--x;
|
|
--x;
|
|
|
|
|
|
ASSERT_EQ(-1, x);
|
|
ASSERT_EQ(-1, x);
|
|
@@ -416,7 +415,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, parse_with_positive_value)
|
|
TEST_F(LongTest, parse_with_positive_value)
|
|
{
|
|
{
|
|
- ls::Long x{};
|
|
|
|
|
|
+ ls::std::boxing::Long x{};
|
|
|
|
|
|
x.parse("1989");
|
|
x.parse("1989");
|
|
ASSERT_EQ(1989, x);
|
|
ASSERT_EQ(1989, x);
|
|
@@ -424,7 +423,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, parse_with_negative_value)
|
|
TEST_F(LongTest, parse_with_negative_value)
|
|
{
|
|
{
|
|
- ls::Long x{};
|
|
|
|
|
|
+ ls::std::boxing::Long x{};
|
|
|
|
|
|
x.parse("-17");
|
|
x.parse("-17");
|
|
ASSERT_EQ(-17, x);
|
|
ASSERT_EQ(-17, x);
|
|
@@ -432,7 +431,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, toString)
|
|
TEST_F(LongTest, toString)
|
|
{
|
|
{
|
|
- ls::Long x{112};
|
|
|
|
|
|
+ ls::std::boxing::Long x{112};
|
|
ASSERT_STREQ("112", x.toString().c_str());
|
|
ASSERT_STREQ("112", x.toString().c_str());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -440,7 +439,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, getValue)
|
|
TEST_F(LongTest, getValue)
|
|
{
|
|
{
|
|
- ls::Long x{3};
|
|
|
|
|
|
+ ls::std::boxing::Long x{3};
|
|
ASSERT_EQ(3, x.getValue());
|
|
ASSERT_EQ(3, x.getValue());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -448,7 +447,7 @@ namespace
|
|
|
|
|
|
TEST_F(LongTest, constApproach)
|
|
TEST_F(LongTest, constApproach)
|
|
{
|
|
{
|
|
- const ls::Long x{3};
|
|
|
|
|
|
+ const ls::std::boxing::Long x{3};
|
|
ASSERT_EQ(3, x);
|
|
ASSERT_EQ(3, x);
|
|
|
|
|
|
// x = 4; // wouldn't work
|
|
// x = 4; // wouldn't work
|