From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_csv_reader_test_8cpp.xhtml | 207 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 20.02/_csv_reader_test_8cpp.xhtml (limited to '20.02/_csv_reader_test_8cpp.xhtml') diff --git a/20.02/_csv_reader_test_8cpp.xhtml b/20.02/_csv_reader_test_8cpp.xhtml new file mode 100644 index 0000000000..de8e4c4c60 --- /dev/null +++ b/20.02/_csv_reader_test_8cpp.xhtml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/CsvReaderTest.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
CsvReaderTest.cpp File Reference
+
+
+
#include "CsvReader.hpp"
+#include <boost/algorithm/string.hpp>
+#include <boost/test/unit_test.hpp>
+#include <iostream>
+#include <string>
+#include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

 BOOST_FIXTURE_TEST_CASE (TestParseVector, TestHelper)
 
 BOOST_FIXTURE_TEST_CASE (TestLoadingFileFromDisk, TestHelper)
 
+

Function Documentation

+ +

◆ BOOST_FIXTURE_TEST_CASE() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (TestParseVector ,
TestHelper  
)
+
+ +

Definition at line 83 of file CsvReaderTest.cpp.

+ +

References BOOST_CHECK(), CsvReader::ParseVector(), and CsvRow::values.

+
84 {
85  CsvReader reader;
86  std::vector<std::string> csvStrings;
87  csvStrings.reserve(2);
88  csvStrings.push_back("airplane, automobile , bird , \"c,a,t\"");
89  csvStrings.push_back("banana, shoe, \"ice\"");
90 
91  std::vector<CsvRow> row = reader.ParseVector(csvStrings);
92  CsvRow row1 = row[0];
93  CsvRow row2 = row[1];
94 
95  BOOST_CHECK(row.size() == 2);
96 
97  BOOST_CHECK(row1.values.size() == 4);
98  BOOST_CHECK(CheckStringsMatch(row1, 0, "airplane") == 0);
99  BOOST_CHECK(CheckStringsMatch(row1, 1, "automobile") == 0);
100  BOOST_CHECK(CheckStringsMatch(row1, 2, "bird") == 0);
101  BOOST_CHECK(CheckStringsMatch(row1, 3, "c,a,t") == 0);
102 
103  BOOST_CHECK(row2.values.size() == 3);
104  BOOST_CHECK(CheckStringsMatch(row2, 0, "banana") == 0);
105  BOOST_CHECK(CheckStringsMatch(row2, 1, "shoe") == 0);
106  BOOST_CHECK(CheckStringsMatch(row2, 2, "ice") == 0);
107 }
std::vector< std::string > values
Definition: CsvReader.hpp:15
+
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
+ +
static std::vector< CsvRow > ParseVector(const std::vector< std::string > &csvVector)
Definition: CsvReader.cpp:52
+ +
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (TestLoadingFileFromDisk ,
TestHelper  
)
+
+ +

Definition at line 109 of file CsvReaderTest.cpp.

+ +

References BOOST_AUTO_TEST_SUITE_END(), BOOST_CHECK(), CsvReader::ParseFile(), and CsvRow::values.

+
110 {
111  CsvReader reader;
112  std::string theFilePath = TestHelper::CreateTempCsvFile();
113 
114  std::vector<CsvRow> row = reader.ParseFile(theFilePath);
115  CsvRow row1 = row[0];
116  CsvRow row2 = row[1];
117 
118  BOOST_CHECK(row.size() == 2);
119 
120  BOOST_CHECK(row1.values.size() == 4);
121  BOOST_CHECK(CheckStringsMatch(row1, 0, "airplane") == 0);
122  BOOST_CHECK(CheckStringsMatch(row1, 1, "bicycle") == 0);
123  BOOST_CHECK(CheckStringsMatch(row1, 2, "bird") == 0);
124  BOOST_CHECK(CheckStringsMatch(row1, 3, "m,o,n,k,e,y") == 0);
125 
126  BOOST_CHECK(row2.values.size() == 3);
127  BOOST_CHECK(CheckStringsMatch(row2, 0, "banana") == 0);
128  BOOST_CHECK(CheckStringsMatch(row2, 1, "shoe") == 0);
129  BOOST_CHECK(CheckStringsMatch(row2, 2, "ice") == 0);
130 }
std::vector< std::string > values
Definition: CsvReader.hpp:15
+
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
+ + +
static std::vector< CsvRow > ParseFile(const std::string &csvFile)
Definition: CsvReader.cpp:32
+
+
+
+
+
+ + + + -- cgit v1.2.1