MCPcopy Index your code
hub / github.com/apache/orc / TEST

Function TEST

tools/test/TestFileScan.cc:28–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26#include "wrap/gtest-wrapper.h"
27
28TEST(TestFileScan, testNominal) {
29 const std::string pgm = findProgram("tools/src/orc-scan");
30 const std::string file = findExample("TestOrcFile.testSeek.orc");
31 std::string output;
32 std::string error;
33 EXPECT_EQ(0, runProgram({pgm, file}, output, error));
34 EXPECT_EQ("Rows: 32768\nBatches: 33\n", output);
35 EXPECT_EQ("", error);
36
37 EXPECT_EQ(0, runProgram({pgm, std::string("-c"), std::string("1,2,3,9"), file}, output, error));
38 EXPECT_EQ("Rows: 32768\nBatches: 33\n", output);
39 EXPECT_EQ("", error);
40
41 EXPECT_EQ(0, runProgram({pgm, std::string("-b"), std::string("256"), file}, output, error));
42 EXPECT_EQ("Rows: 32768\nBatches: 131\n", output);
43 EXPECT_EQ("", error);
44
45 EXPECT_EQ(0, runProgram({pgm, std::string("-b"), std::string("256"), std::string("-c"),
46 std::string("1,2,3"), file},
47 output, error));
48 EXPECT_EQ("Rows: 32768\nBatches: 131\n", output);
49 EXPECT_EQ("", error);
50
51 EXPECT_EQ(0, runProgram({pgm, std::string("-b256"), file}, output, error));
52 EXPECT_EQ("Rows: 32768\nBatches: 131\n", output);
53 EXPECT_EQ("", error);
54
55 EXPECT_EQ(0, runProgram({pgm, std::string("--batch"), std::string("256"), file}, output, error));
56 EXPECT_EQ("Rows: 32768\nBatches: 131\n", output);
57 EXPECT_EQ("", error);
58
59 EXPECT_EQ(0, runProgram({pgm, std::string("--batch=256"), file}, output, error));
60 EXPECT_EQ("Rows: 32768\nBatches: 131\n", output);
61 EXPECT_EQ("", error);
62
63 EXPECT_EQ(0, runProgram({pgm, std::string("--batch=256"), std::string("--columns=1,2,3"), file},
64 output, error));
65 EXPECT_EQ("Rows: 32768\nBatches: 131\n", output);
66 EXPECT_EQ("", error);
67}
68
69/**
70 * This function locates the goal substring in the input and removes

Callers

nothing calls this directly

Calls 6

findProgramFunction · 0.85
findExampleFunction · 0.85
runProgramFunction · 0.85
removeCharsFunction · 0.85
stripPrefixFunction · 0.85
checkForErrorFunction · 0.85

Tested by

no test coverage detected