Next tests for PIString 81-90
This commit is contained in:
@@ -520,3 +520,83 @@ TEST(PIString_Tests, operator_shift_cstring){
|
||||
PIString res = "shift chat";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_wchar_t){
|
||||
PIString str1 = "shif";
|
||||
wchar_t str2[] = L"t cc";
|
||||
str1 << str2;
|
||||
PIString res = "shift cc";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_int){
|
||||
PIString str1 = "shift ";
|
||||
int numb = -2147483648;
|
||||
str1 << numb;
|
||||
PIString res = "shift -2147483648";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_uint){
|
||||
PIString str1 = "shift ";
|
||||
uint numb = 4294967295;
|
||||
str1 << numb;
|
||||
PIString res = "shift 4294967295";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_short){
|
||||
PIString str1 = "shift ";
|
||||
short numb = -32768;
|
||||
str1 << numb;
|
||||
PIString res = "shift -32768";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_ushort){
|
||||
PIString str1 = "shift ";
|
||||
ushort numb = 65535;
|
||||
str1 << numb;
|
||||
PIString res = "shift 65535";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_long){
|
||||
PIString str1 = "shift ";
|
||||
long numb = -2147483648;
|
||||
str1 << numb;
|
||||
PIString res = "shift -2147483648";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_ulong){
|
||||
PIString str1 = "shift ";
|
||||
ulong numb = 4294967295;
|
||||
str1 << numb;
|
||||
PIString res = "shift 4294967295";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_llong){
|
||||
PIString str1 = "shift ";
|
||||
llong numb = -9223372036854775807;
|
||||
str1 << numb;
|
||||
PIString res = "shift -9223372036854775807";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_ullong){
|
||||
PIString str1 = "shift ";
|
||||
ullong numb = 1844674407370955161;
|
||||
str1 << numb;
|
||||
PIString res = "shift 1844674407370955161";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
TEST(PIString_Tests, operator_shift_float){
|
||||
PIString str1 = "shift ";
|
||||
float numb = -67.88999939f;
|
||||
str1 << numb;
|
||||
PIString res = "shift -67.88999939";
|
||||
ASSERT_EQ(res, str1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user