Trigger: warning code on normal engine start up #669
This commit is contained in:
parent
55b7fc08d8
commit
2c66d74c7e
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue