From 4a1845ab43395de6838e535bdf7ca932316ee9ec Mon Sep 17 00:00:00 2001
From: xuxiuxi <554325746@qq.com>
Date: 星期五, 15 三月 2019 10:30:18 +0800
Subject: [PATCH] Merge branch 'yw.1.2.fixbug' of http://192.168.1.226:10010/r/development/c++ into yw.1.2.fixbug
---
QiaoJiaSystem/UnitTest/BasicStruct_test.cpp | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/QiaoJiaSystem/UnitTest/BasicStruct_test.cpp b/QiaoJiaSystem/UnitTest/BasicStruct_test.cpp
index 3d57043..f4184c6 100644
--- a/QiaoJiaSystem/UnitTest/BasicStruct_test.cpp
+++ b/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));
+
}
\ No newline at end of file
--
Gitblit v1.8.0