派生自 development/c++

xuxiuxi
2019-03-04 17675f1c6447b6e014b520608ce6d5f1f2e9707a
QiaoJiaSystem/UnitTest/BasicStruct_test.cpp
@@ -80,4 +80,21 @@
    CHECK(AppUtil::IsRightAfterLeft(firstTime,secondTime));
    CHECK_FALSE(AppUtil::IsRightAfterLeft(secondTime,firstTime));
}
TEST_CASE("BetweenLimit"){
    std::string strImageKey ="DS-2CD5026EFWD20180202AACH181129936$2019-02-01-09-49-35_1588152";
    std::string strVideoName = "DS-2CD5026EFWD20180202AACH181129936$2019-02-01-09-49-35_1587925_1588424.mp4";
    ImageName_s_t imgSt = ImageName_s_t::fromString(strImageKey);
    VideoName_s_t videoSt = VideoName_s_t::fromString(strVideoName);
    CHECK(imgSt.Valid());
    CHECK(videoSt.Valid());
    CHECK((imgSt.m_frameId < videoSt.m_endFrameId));
    CHECK(imgSt.m_frameId > videoSt.m_startFrameId);
    auto firstTime = AppUtil::ParseFromHypenTimeStr(imgSt.m_timeStamp);
    auto secondTime = AppUtil::ParseFromHypenTimeStr(videoSt.m_timeStamp);
    CHECK(AppUtil::IsRightAfterLeft(firstTime,secondTime));
    //CHECK_FALSE(AppUtil::IsRightAfterLeft(secondTime,firstTime));
}