MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/arrow/csv/parser_test.cc:48–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48TEST(SkipRows, Basics) {
49 CheckSkipRows("", 0, 0, 0);
50 CheckSkipRows("", 15, 0, 0);
51
52 CheckSkipRows("a\nb\nc\nd", 1, 1, 2);
53 CheckSkipRows("a\nb\nc\nd", 2, 2, 4);
54 CheckSkipRows("a\nb\nc\nd", 3, 3, 6);
55 CheckSkipRows("a\nb\nc\nd", 4, 3, 6);
56
57 CheckSkipRows("a\nb\nc\nd\n", 3, 3, 6);
58 CheckSkipRows("a\nb\nc\nd\n", 4, 4, 8);
59 CheckSkipRows("a\nb\nc\nd\n", 5, 4, 8);
60
61 CheckSkipRows("\t\n\t\n\t\n\t", 1, 1, 2);
62 CheckSkipRows("\t\n\t\n\t\n\t", 3, 3, 6);
63 CheckSkipRows("\t\n\t\n\t\n\t", 4, 3, 6);
64
65 CheckSkipRows("a\r\nb\nc\rd\r\n", 1, 1, 3);
66 CheckSkipRows("a\r\nb\nc\rd\r\n", 2, 2, 5);
67 CheckSkipRows("a\r\nb\nc\rd\r\n", 3, 3, 7);
68 CheckSkipRows("a\r\nb\nc\rd\r\n", 4, 4, 10);
69 CheckSkipRows("a\r\nb\nc\rd\r\n", 5, 4, 10);
70
71 CheckSkipRows("a\r\nb\nc\rd\r", 4, 4, 9);
72 CheckSkipRows("a\r\nb\nc\rd\r", 5, 4, 9);
73 CheckSkipRows("a\r\nb\nc\rd\re", 4, 4, 9);
74 CheckSkipRows("a\r\nb\nc\rd\re", 5, 4, 9);
75
76 CheckSkipRows("\n\r\n\r\r\n\n\r\n\r", 1, 1, 1);
77 CheckSkipRows("\n\r\n\r\r\n\n\r\n\r", 2, 2, 3);
78 CheckSkipRows("\n\r\n\r\r\n\n\r\n\r", 3, 3, 4);
79 CheckSkipRows("\n\r\n\r\r\n\n\r\n\r", 4, 4, 6);
80 CheckSkipRows("\n\r\n\r\r\n\n\r\n\r", 5, 5, 7);
81 CheckSkipRows("\n\r\n\r\r\n\n\r\n\r", 6, 6, 9);
82 CheckSkipRows("\n\r\n\r\r\n\n\r\n\r", 7, 7, 10);
83 CheckSkipRows("\n\r\n\r\r\n\n\r\n\r", 8, 7, 10);
84}
85
86////////////////////////////////////////////////////////////////////////////
87// BlockParser tests

Callers

nothing calls this directly

Calls 15

CheckSkipRowsFunction · 0.85
MakeCSVDataFunction · 0.85
AssertParseOkFunction · 0.85
AssertColumnsEqFunction · 0.85
AssertLastRowEqFunction · 0.85
ParseFinalFunction · 0.85
AssertParsePartialFunction · 0.85
ViewsFunction · 0.85
AssertParseFinalFunction · 0.85
MismatchingNumColumnsFunction · 0.85
GetLastRowFunction · 0.85
to_stringFunction · 0.85

Tested by

no test coverage detected