-
Notifications
You must be signed in to change notification settings - Fork 200
Expand file tree
/
Copy pathtest085.cpp
More file actions
29 lines (23 loc) · 1018 Bytes
/
Copy pathtest085.cpp
File metadata and controls
29 lines (23 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// test085.cpp - read UTF-16 LE file
#include <rapidcsv.h>
#include "unittest.h"
int main()
{
int rv = 0;
try
{
rapidcsv::Document doc("../tests/chi-utf16.csv", rapidcsv::LabelParams(0, 0), rapidcsv::SeparatorParams(';'));
unittest::ExpectEqual(std::string, doc.GetCell<std::string>("description", "0"), "等待同PLC的Profinet通讯");
unittest::ExpectEqual(std::string, doc.GetCell<std::string>("description", "1"), "辅助关闭");
unittest::ExpectEqual(std::string, doc.GetCell<std::string>("description", "2"), "Z1轴运行中转轮锁定");
unittest::ExpectEqual(std::string, doc.GetCell<std::string>(0, 7), "设备不正常");
unittest::ExpectEqual(std::string, doc.GetCell<std::string>(0, 8), "标准件校对:工装翻转补偿值不正确");
unittest::ExpectEqual(std::string, doc.GetCell<std::string>(0, 39), "达到扭矩限制");
}
catch (const std::exception& ex)
{
std::cout << "exception: " << ex.what() << std::endl;
rv = 1;
}
return rv;
}