Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples (1 of 14 files). Show all
Unified · Split
| @@ -640,17 +640,19 @@ int main(int argc, char* argv[]) · 639 unmodified lines | ||
| 640 | 640 | cout << "Test " << ++test << " succeeded..." << endl; |
| 641 | 641 | |
| 642 | 642 | // Test 36 - validate data load |
| 643 | + dataRow = dataSet->Table("DeviceDetail")->Row(0); | |
| 644 | + | |
| 643 | 645 | assert(IsEqual( |
| 644 | − dataSet->Table("DeviceDetail")->Row(0)->ValueAsString("Acronym").GetValueOrDefault(), | |
| 645 | − dataSet->Table("DeviceDetail")->Row(0)->ValueAsString("Name").GetValueOrDefault() | |
| 646 | + dataRow->ValueAsString("Acronym").GetValueOrDefault(), | |
| 647 | + dataRow->ValueAsString("Name").GetValueOrDefault() | |
| 646 | 648 | )); |
| 647 | 649 | |
| 648 | 650 | // In test data set, DeviceDetail.OriginalSource is null |
| 649 | − assert(!dataSet->Table("DeviceDetail")->Row(0)->ValueAsString("OriginalSource").HasValue()); | |
| 651 | + assert(!dataRow->ValueAsString("OriginalSource").HasValue()); | |
| 650 | 652 | |
| 651 | 653 | // In test data set, DeviceDetail.ParentAcronym is not null, but is an empty string |
| 652 | − assert(dataSet->Table("DeviceDetail")->Row(0)->ValueAsString("ParentAcronym").HasValue()); | |
| 653 | − assert(static_cast<string>(dataSet->Table("DeviceDetail")->Row(0)->ValueAsString("ParentAcronym").Value).empty()); | |
| 654 | + assert(dataRow->ValueAsString("ParentAcronym").HasValue()); | |
| 655 | + assert(static_cast<string>(dataRow->ValueAsString("ParentAcronym").Value).empty()); | |
| 654 | 656 | cout << "Test " << ++test << " succeeded..." << endl; |
| 655 | 657 | |
| 656 | 658 | TableIDFieldsPtr measurementDetailIDFields = NewSharedPtr<TableIDFields>(); |
| @@ -876,7 +878,6 @@ int main(int argc, char* argv[]) · 219 unmodified lines | ||
| 876 | 878 | cout << "Test " << ++test << " succeeded..." << endl; |
| 877 | 879 | |
| 878 | 880 | // Test 74 |
| 879 | − dataRow = dataSet->Table("DeviceDetail")->Row(0); | |
| 880 | 881 | valueExpression = FilterExpressionParser::Evaluate(dataRow, "AccessID % 2 = 0 AND FramesPerSecond % 4 <> 2 OR AccessID % 1 = 0"); |
| 881 | 882 | |
| 882 | 883 | assert(valueExpression->ValueType == ExpressionValueType::Boolean); |