????????????????е????
???????????? ???????[ 2012/7/9 15:04:16 ] ????????
????????????????????????????????????????????????????????????????????????????????????????????????
????????Inversion of Control???????д?IoC?????????????????????????????????????????????????????????????????????????????Dependency Injection???????DI.
??????????????????????????????????????????ж?????????壬????????????????????????????????????????????????????С?????????????????????????????????е???á?
??????????????????????????????????????????????????????"???????????????"?????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????
void reorder??
bsl::deque<uint32_t> &deque??
{
srand??getCurTime????????
for ??int indexLeft = 0;
indexLeft < deque.size??????
++indexLeft??
{
int indexRight = rand????% ??deque.size????-indexLeft????
swap??deque[indexLeft]??
deque[indexRight]????
}
}
?????????
????????????????????????????????
TEST_OLD??test_reorder_suite??should_reorder_deque_randomly??
{
bsl::deque<uint32_t> deque;
deque.push_back??1????
deque.push_back??2????
reorder??deque????
EXPECT_EQ??deque[0]?? 2????
EXPECT_EQ??deque[1]?? 1????
}
????????
// ??reorder?????г?????????
void reorder_by_seed??uint32_t seed??
bsl::deque<uint32_t> &deque??
{
srand??seed????
for ??int indexLeft = 0;
indexLeft < deque.size??????
++indexLeft??
{
int indexRight = rand????
% ??deque.size????-indexLeft????
swap??deque[indexLeft]??
deque[indexRight]????
}
}
void reorder??
bsl::deque<uint32t> &deque??
{
reorder_by_seed??getCurTime??????
deque????
}
???????????
TEST_NEW??test_reorder_by_seed_suite??
should_reorder_deque_by_seed_randomly??
{
bsl::deque<uint32_t> deque;
deque.push_back??1????
deque.push_back??2????
uint32_t seed = 12;
reorder_by_seed??seed?? deque????
EXPECT_EQ??deque[0]?? 2????
EXPECT_EQ??deque[1]?? 1????
}
?????????????????????????????????????????????????????????????????????????????????????????????ɡ?
????????Inversion of Control???????д?IoC?????????????????????????????????????????????????????????????????????????????Dependency Injection???????DI.
??????????????????????????????????????????ж?????????壬????????????????????????????????????????????????????С?????????????????????????????????е???á?
??????????????????????????????????????????????????????"???????????????"?????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????
void reorder??
bsl::deque<uint32_t> &deque??
{
srand??getCurTime????????
for ??int indexLeft = 0;
indexLeft < deque.size??????
++indexLeft??
{
int indexRight = rand????% ??deque.size????-indexLeft????
swap??deque[indexLeft]??
deque[indexRight]????
}
}
?????????
????????????????????????????????
TEST_OLD??test_reorder_suite??should_reorder_deque_randomly??
{
bsl::deque<uint32_t> deque;
deque.push_back??1????
deque.push_back??2????
reorder??deque????
EXPECT_EQ??deque[0]?? 2????
EXPECT_EQ??deque[1]?? 1????
}
????????
// ??reorder?????г?????????
void reorder_by_seed??uint32_t seed??
bsl::deque<uint32_t> &deque??
{
srand??seed????
for ??int indexLeft = 0;
indexLeft < deque.size??????
++indexLeft??
{
int indexRight = rand????
% ??deque.size????-indexLeft????
swap??deque[indexLeft]??
deque[indexRight]????
}
}
void reorder??
bsl::deque<uint32t> &deque??
{
reorder_by_seed??getCurTime??????
deque????
}
???????????
TEST_NEW??test_reorder_by_seed_suite??
should_reorder_deque_by_seed_randomly??
{
bsl::deque<uint32_t> deque;
deque.push_back??1????
deque.push_back??2????
uint32_t seed = 12;
reorder_by_seed??seed?? deque????
EXPECT_EQ??deque[0]?? 2????
EXPECT_EQ??deque[1]?? 1????
}
?????????????????????????????????????????????????????????????????????????????????????????????ɡ?
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????д?ò??????????????????????????????Щ??????????????????????????????????????????????????????????????APP????????????????????????????????????????5??????????????????????SQL?????в??????????Щ???????裿??γ???????????????????????????????Щ???????????????????д?淶???????????????????????????????????????裿
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????