派生自 development/c++

pansen
2019-03-07 979bc003bce710bf300bc2bd87a8278585678763
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));
}