Changeset 6962
- Timestamp:
- 11/08/11 10:43:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/TableFileParserTest.cs
r6866 r6962 185 185 186 186 [TestMethod] 187 public void ParseEnglishCSVWithoutCommasWithoutSpace() { 188 string tempFileName = Path.GetTempFileName(); 189 WriteToFile(tempFileName, 190 @"0,0,0,3 191 0,0,0,0 192 0,0,0,0 193 0,0,0,0 194 0,0,0,0 195 0,0,0,0"); 196 TableFileParser parser = new TableFileParser(); 197 try { 198 parser.Parse(tempFileName); 199 Assert.AreEqual(6, parser.Rows); 200 Assert.AreEqual(4, parser.Columns); 201 Assert.AreEqual((double)parser.Values[3][0], 3); 202 } 203 finally { 204 File.Delete(tempFileName); 205 } 206 } 207 208 [TestMethod] 187 209 public void ParseEnglishCSVWithoutCommasWithNames() { 188 210 string tempFileName = Path.GetTempFileName(); … … 195 217 0, 0, 0, 0 196 218 0, 0, 0, 0"); 219 TableFileParser parser = new TableFileParser(); 220 try { 221 parser.Parse(tempFileName); 222 Assert.AreEqual(6, parser.Rows); 223 Assert.AreEqual(4, parser.Columns); 224 Assert.AreEqual((double)parser.Values[3][0], 3); 225 } 226 finally { 227 File.Delete(tempFileName); 228 } 229 } 230 231 [TestMethod] 232 public void ParseEnglishCSVWithoutCommasWithoutSpacesWithNames() { 233 string tempFileName = Path.GetTempFileName(); 234 WriteToFile(tempFileName, 235 @"x01,x02,x03,x04 236 0,0,0,3 237 0,0,0,0 238 0,0,0,0 239 0,0,0,0 240 0,0,0,0 241 0,0,0,0"); 197 242 TableFileParser parser = new TableFileParser(); 198 243 try {
Note: See TracChangeset
for help on using the changeset viewer.