@@ -148,9 +148,7 @@ static Status ValidateArrowVsJson(
148148 << " Arrow schema: \n "
149149 << arrow_schema->ToString ();
150150
151- if (FLAGS_verbose) {
152- std::cout << ss.str () << std::endl;
153- }
151+ if (FLAGS_verbose) { std::cout << ss.str () << std::endl; }
154152 return Status::Invalid (" Schemas did not match" );
155153 }
156154
@@ -233,8 +231,8 @@ class TestJSONIntegration : public ::testing::Test {
233231 do {
234232 std::shared_ptr<io::FileOutputStream> out;
235233 RETURN_NOT_OK (io::FileOutputStream::Open (path, &out));
236- RETURN_NOT_OK (out->Write (reinterpret_cast < const uint8_t *>(data),
237- static_cast <int64_t >(strlen (data))));
234+ RETURN_NOT_OK (out->Write (
235+ reinterpret_cast < const uint8_t *>(data), static_cast <int64_t >(strlen (data))));
238236 } while (0 );
239237 return Status::OK ();
240238 }
@@ -366,15 +364,18 @@ TEST_F(TestJSONIntegration, ErrorStates) {
366364int main (int argc, char ** argv) {
367365 gflags::ParseCommandLineFlags (&argc, &argv, true );
368366
367+ int ret = 0 ;
368+
369369 if (FLAGS_integration) {
370370 arrow::Status result = arrow::RunCommand (FLAGS_json, FLAGS_arrow, FLAGS_mode);
371371 if (!result.ok ()) {
372372 std::cout << " Error message: " << result.ToString () << std::endl;
373- return 1 ;
373+ ret = 1 ;
374374 }
375375 } else {
376376 ::testing::InitGoogleTest (&argc, argv);
377- return RUN_ALL_TESTS ();
377+ ret = RUN_ALL_TESTS ();
378378 }
379- return 0 ;
379+ gflags::ShutDownCommandLineFlags ();
380+ return ret;
380381}
0 commit comments