Trigger: warning code on normal engine start up #669

This commit is contained in:
Andrey 2021-06-18 22:52:01 -04:00
parent 55b7fc08d8
commit 2c66d74c7e
1 changed files with 28 additions and 1 deletions

View File

@ -8,7 +8,34 @@
#include "engine_test_helper.h"
TEST(cranking, realNA) {
FILE * fp = fopen("tests/trigger/recourses/cranking_na_3.csv", "r");
FILE *fp = fopen("tests/trigger/recourses/cranking_na_3.csv", "r");
char *line = nullptr;
size_t len = 0;
ssize_t read;
int index = -1;
while ((read = getline(&line, &len, fp)) != -1) {
index++;
if (index == 0) {
// skip header
continue;
}
const char s[2] = ",";
char *token;
/* get the first token */
token = strtok(line, s);
/* walk through other tokens */
while (token != NULL) {
// printf(" %s\n", token);
token = strtok(NULL, s);
}
}
ASSERT_TRUE(fp != nullptr);
}