aidl: unify return type of sub-task functions

Bug: N/A
Test: aidl_unittests
Change-Id: Ia271cf892756212c67990445965365e406249c84
diff --git a/aidl_unittest.cpp b/aidl_unittest.cpp
index b2e6eb4..6484fd0 100644
--- a/aidl_unittest.cpp
+++ b/aidl_unittest.cpp
@@ -433,15 +433,15 @@
       "a/Foo.aidl",
       StringPrintf("package a; @JavaOnlyStableParcelable parcelable Foo cpp_header \"Foo.h\" ;"));
 
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(cpp_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_));
 
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(cpp_structured_options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(cpp_structured_options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("Cannot declare unstructured"));
 
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(rust_options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(rust_options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("Cannot declare unstructured"));
 }
 
@@ -449,7 +449,7 @@
   io_delegate_.SetFileContents("a/Foo.aidl", R"(package a;
     @JavaDerive(toString=true) parcelable Foo { int a; float b; })");
   Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
 
   string java_out;
   EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &java_out));
@@ -457,10 +457,10 @@
 
   // Other backends shouldn't be bothered
   Options cpp_options = Options::From("aidl --lang=cpp -o out -h out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(cpp_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_));
 
   Options ndk_options = Options::From("aidl --lang=ndk -o out -h out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(ndk_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(ndk_options, io_delegate_));
 }
 
 TEST_F(AidlTest, UnionSupportJavaDeriveToString) {
@@ -468,7 +468,7 @@
     @JavaDerive(toString=true) union Foo { int a; int[] b; })");
   CaptureStderr();
   Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 
   const string expected_to_string_method = R"--(
@@ -492,7 +492,7 @@
     @JavaDerive(equals=true) parcelable Foo { int a; float b; })");
   CaptureStderr();
   Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 
   const std::string expected = R"--(
@@ -523,7 +523,7 @@
     @JavaDerive(equals=true) union Foo { int a; int[] b; })");
   CaptureStderr();
   Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 
   const std::string expected = R"--(
@@ -555,7 +555,7 @@
                                  "package a; @JavaDerive(blah=true) parcelable Foo{}");
     Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
     CaptureStderr();
-    EXPECT_NE(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+    EXPECT_FALSE(compile_aidl(java_options, io_delegate_));
     const std::string expected_stderr =
         "ERROR: a/Foo.aidl:1.11-34: Parameter blah not supported for annotation JavaDerive.";
     EXPECT_THAT(GetCapturedStderr(),
@@ -566,7 +566,7 @@
     io_delegate_.SetFileContents("a/IFoo.aidl", "package a; @JavaDerive interface IFoo{}");
     Options java_options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
     CaptureStderr();
-    EXPECT_NE(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+    EXPECT_FALSE(compile_aidl(java_options, io_delegate_));
     EXPECT_THAT(GetCapturedStderr(), HasSubstr("@JavaDerive is not available."));
   }
 
@@ -574,7 +574,7 @@
     io_delegate_.SetFileContents("a/IFoo.aidl", "package a; @JavaDerive enum IFoo { A=1, }");
     Options java_options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
     CaptureStderr();
-    EXPECT_NE(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+    EXPECT_FALSE(compile_aidl(java_options, io_delegate_));
     EXPECT_THAT(GetCapturedStderr(), HasSubstr("@JavaDerive is not available."));
   }
 }
@@ -674,7 +674,7 @@
   io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo;");
   Options options = Options::From("aidl --lang cpp -h h -o o Foo.aidl");
   CaptureStderr();
-  EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("must have C++ header defined"));
 }
 
@@ -683,7 +683,7 @@
   io_delegate_.SetFileContents("IBar.aidl", "interface IBar { void bar(in Foo foo); }");
   Options options = Options::From("aidl -I . --lang cpp -h h -o o IBar.aidl");
   CaptureStderr();
-  EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("must have C++ header defined"));
 }
 
@@ -827,7 +827,7 @@
   io_delegate_.SetFileContents("preprocessed", preprocessed);
   CaptureStderr();
   auto options = Options::From("aidl --lang java -o out a/Foo.aidl -ppreprocessed");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
   string code;
   EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &code));
@@ -847,7 +847,7 @@
                                "parcelable Outer.Inner2;\n");
   auto opt = Options::From("aidl -Iimported --lang=java p/IFoo.aidl");
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(opt, io_delegate_));
+  EXPECT_TRUE(compile_aidl(opt, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -861,7 +861,7 @@
                                "parcelable Foo.Inner;\n");
   auto opt = Options::From("aidl -psdk/framework.aidl -I. x/Foo.aidl");
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(opt, io_delegate_));
+  EXPECT_TRUE(compile_aidl(opt, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -882,7 +882,7 @@
                                "parcelable Foo.Inner;\n");
   auto opt = Options::From("aidl -psdk/framework.aidl -I. x/IBar.aidl");
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(opt, io_delegate_));
+  EXPECT_TRUE(compile_aidl(opt, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -926,7 +926,7 @@
 
     auto options = Options::From("aidl --lang=" + to_string(GetLanguage()) + " " + filename +
                                  " --out=out --header_out=out");
-    EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+    EXPECT_TRUE(compile_aidl(options, io_delegate_));
     for (const auto& [lang, test_case] : expectations) {
       if (lang != GetLanguage()) continue;
       string output;
@@ -1096,13 +1096,13 @@
   // By default, we shouldn't fail on parcelable.
   Options options1 = Options::From("aidl p/IFoo.aidl");
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options1, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options1, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 
   // -b considers this an error
   Options options2 = Options::From("aidl -b p/IFoo.aidl");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options2, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options2, io_delegate_));
   EXPECT_EQ(expected_foo_stderr, GetCapturedStderr());
 
   const string expected_bar_stderr =
@@ -1114,11 +1114,11 @@
   // With '-b' option, a parcelable and an interface should fail.
   Options options3 = Options::From("aidl p/IBar.aidl");
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options3, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options3, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
   Options options4 = Options::From("aidl -b p/IBar.aidl");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options4, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options4, io_delegate_));
   EXPECT_EQ(expected_bar_stderr, GetCapturedStderr());
 }
 
@@ -1188,7 +1188,7 @@
   io_delegate_.SetFileContents("a/Foo.aidl", "package a; parcelable Foo { const int y = true; }");
   CaptureStderr();
   auto options = Options::From("aidl --lang java -o out a/Foo.aidl");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
   string code;
   EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &code));
@@ -1459,7 +1459,7 @@
     "p/IFoo.aidl"};
   Options options = Options::From(args);
   io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   string actual_dep_file_contents;
   EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents));
   EXPECT_EQ(actual_dep_file_contents, kExpectedDepFileContents);
@@ -1477,7 +1477,7 @@
     "p/IFoo.aidl"};
   Options options = Options::From(args);
   io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   string actual_dep_file_contents;
   EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents));
   EXPECT_EQ(actual_dep_file_contents, kExpectedNinjaDepFileContents);
@@ -1496,7 +1496,7 @@
     "p/Foo.aidl"};
   Options options = Options::From(args);
   io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   string actual_dep_file_contents;
   EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents));
   EXPECT_EQ(actual_dep_file_contents, kExpectedParcelableDeclarationDepFileContents);
@@ -1511,7 +1511,7 @@
     "p/Foo.aidl"};
   Options options = Options::From(args);
   io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo {int a;}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   string actual_dep_file_contents;
   EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents));
   EXPECT_EQ(actual_dep_file_contents, kExpectedStructuredParcelableDepFileContents);
@@ -1525,7 +1525,7 @@
     "p/Foo.aidl"};
   Options options = Options::From(args);
   io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   string output_file_contents;
   EXPECT_FALSE(io_delegate_.GetWrittenContents(options.OutputFile(), &output_file_contents));
 }
@@ -1637,7 +1637,7 @@
   Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
   const string expected_stderr = "ERROR: Foo.aidl:1.27-44: ParcelableHolder cannot be nullable.\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   if (GetLanguage() == Options::Language::RUST) {
     EXPECT_EQ(
         "ERROR: Foo.aidl:1.27-44: ParcelableHolder cannot be nullable.\n"
@@ -1653,7 +1653,7 @@
   io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { const int BIT = 0x1 << 3; }");
   Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -1661,7 +1661,7 @@
   io_delegate_.SetFileContents("Foo.aidl", "union Foo { const int BIT = 0x1 << 3; int n; }");
   Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -1673,7 +1673,7 @@
                                "}");
   Options options = Options::From("aidl IFoo.aidl --lang=java -o out");
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
   string code;
   EXPECT_TRUE(io_delegate_.GetWrittenContents("out/IFoo.java", &code));
@@ -1905,14 +1905,14 @@
                                "package p; interface IFoo {"
                                "void foo(List<String, String> a);}");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_list_stderr, GetCapturedStderr());
 
   io_delegate_.SetFileContents(options.InputFiles().front(),
                                "package p; interface IFoo {"
                                "void foo(Map<String> a);}");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_map_stderr, GetCapturedStderr());
 }
 
@@ -1925,24 +1925,24 @@
   io_delegate_.SetFileContents("p/IFoo.aidl",
                                "package p; interface IFoo {"
                                "Map<String, p.Bar> foo();}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 
   io_delegate_.SetFileContents("p/IFoo.aidl",
                                "package p; interface IFoo {"
                                "Map<p.Bar, p.Bar> foo();}");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 
   io_delegate_.SetFileContents("p/IFoo.aidl",
                                "package p; interface IFoo {"
                                "Map<String, String> foo();}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 
   io_delegate_.SetFileContents("p/IFoo.aidl",
                                "package p; interface IFoo {"
                                "Map<String, ParcelFileDescriptor> foo();}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 }
 
 TEST_F(AidlTest, WrongGenericType) {
@@ -1952,7 +1952,7 @@
                                "package p; interface IFoo {"
                                "String<String> foo(); }");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -1960,7 +1960,7 @@
   Options optionsForParcelable = Options::From("aidl -I . p/Bar.aidl");
   io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T, T>;");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(optionsForParcelable, io_delegate_));
+  EXPECT_FALSE(compile_aidl(optionsForParcelable, io_delegate_));
   EXPECT_EQ("ERROR: p/Bar.aidl:1.22-26: Every type parameter should be unique.\n",
             GetCapturedStderr());
 
@@ -1970,18 +1970,18 @@
                                "package p; interface IFoo {"
                                "p.Bar<String, String> foo();}");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("p.Bar is not a generic type"));
   io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T>;");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("p.Bar must have 1 type parameters, but got 2"));
   io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T, V>;");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   io_delegate_.SetFileContents("p/IFoo.aidl",
                                "package p; interface IFoo {"
                                "p.Bar<String, ParcelFileDescriptor> foo();}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 
   io_delegate_.SetFileContents("p/IFoo.aidl",
                                "package p; interface IFoo {"
@@ -1991,7 +1991,7 @@
                                "package p; interface IFoo {"
                                "p.Bar<int[], long[]> foo();}");
 
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 }
 
 TEST_F(AidlTest, FailOnMultipleTypesInSingleFile) {
@@ -2009,7 +2009,7 @@
                                  "parcelable Data1 { int a; int b;}\n"
                                  "parcelable Data2 { int a; int b;}\n");
     CaptureStderr();
-    EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+    EXPECT_FALSE(compile_aidl(options, io_delegate_));
     EXPECT_EQ(expected_stderr, GetCapturedStderr());
 
     io_delegate_.SetFileContents(options.InputFiles().front(),
@@ -2017,7 +2017,7 @@
                                  "interface IFoo1 { int foo(); }\n"
                                  "interface IFoo2 { int foo(); }\n");
     CaptureStderr();
-    EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+    EXPECT_FALSE(compile_aidl(options, io_delegate_));
     EXPECT_EQ(expected_stderr, GetCapturedStderr());
 
     expected_stderr = "ERROR: foo/bar/Foo.aidl:3.11-17: You must declare only one type per file.\n";
@@ -2026,7 +2026,7 @@
                                  "parcelable Data1 { int a; int b;}\n"
                                  "parcelable Data2 { int a; int b;}\n");
     CaptureStderr();
-    EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+    EXPECT_FALSE(compile_aidl(options, io_delegate_));
     EXPECT_EQ(expected_stderr, GetCapturedStderr());
   }
 }
@@ -2053,7 +2053,7 @@
         "import foo.bar.IFoo;\n"
         "parcelable Data { IFoo foo; }\n");
 
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 
   string content;
   for (const auto file : {
@@ -2078,7 +2078,7 @@
         "import foo.bar.IFoo;\n"
         "parcelable Data { IFoo foo; }\n");
 
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 
   string content;
   for (const auto file : {
@@ -2106,7 +2106,7 @@
                                "import foo.bar.IFoo;\n"
                                "parcelable Data { IFoo foo; }\n");
 
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 
   string content;
   for (const auto file : {"out/foo/bar/IFoo.rs", "out/foo/bar/Data.rs"}) {
@@ -2125,7 +2125,7 @@
                                "package p; interface IFoo {"
                                "int getInterfaceVersion(); }");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -2139,7 +2139,7 @@
                                "package p; interface IFoo {"
                                "boolean getInterfaceVersion(); }");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -2152,14 +2152,14 @@
                                "package p; interface IFoo {"
                                "String getTransactionName(int code); }");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 
   // this is not a meta interface method as it differs type arguments
   io_delegate_.SetFileContents(options.InputFiles().front(),
                                "package p; interface IFoo {"
                                "String getTransactionName(); }");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 }
 
 TEST_F(AidlTest, CheckApiForEquality) {
@@ -3022,7 +3022,7 @@
   Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(GetLanguage()));
 
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3035,7 +3035,7 @@
   Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(GetLanguage()));
 
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3051,7 +3051,7 @@
   io_delegate_.SetFileContents("dir2/q/IBar.aidl", "package q; interface IBar{}");
 
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3078,7 +3078,7 @@
   // use without import
   io_delegate_.SetFileContents("p/IFoo.aidl",
                                "package p; interface IFoo{ void foo(in ParcelFileDescriptor fd);}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 
   // capture output files
   map<string, string> outputs = io_delegate_.OutputFiles();
@@ -3087,7 +3087,7 @@
   io_delegate_.SetFileContents(
       "p/IFoo.aidl",
       "package p; interface IFoo{ void foo(in android.os.ParcelFileDescriptor fd);}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   // output files should be the same
   EXPECT_EQ(outputs, io_delegate_.OutputFiles());
 
@@ -3098,7 +3098,7 @@
                                "interface IFoo{"
                                "  void foo(in ParcelFileDescriptor fd);"
                                "}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   // output files should be the same
   EXPECT_EQ(outputs, io_delegate_.OutputFiles());
 }
@@ -3111,7 +3111,7 @@
                                "interface IFoo{"
                                "  void foo(out ParcelFileDescriptor fd);"
                                "}");
-  EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("can't be an out parameter"));
 }
 
@@ -3123,7 +3123,7 @@
                                "interface IFoo{"
                                "  void foo(ParcelFileDescriptor fd);"
                                "}");
-  EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(),
               HasSubstr("ParcelFileDescriptor can be an in or inout parameter."));
 }
@@ -3135,7 +3135,7 @@
                                "  void foo() = 0;\n"
                                "  void bar() = 1;\n"
                                "}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 }
 
 TEST_F(AidlTest, ManualIdsWithMetaTransactions) {
@@ -3145,7 +3145,7 @@
                                "  void foo() = 0;\n"
                                "  void bar() = 1;\n"
                                "}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 }
 
 TEST_F(AidlTest, FailOnDuplicatedIds) {
@@ -3158,7 +3158,7 @@
                                "  void bar() = 3;\n"
                                "}");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3174,7 +3174,7 @@
                                "  void bar() = 16777115;\n"
                                "}");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3188,7 +3188,7 @@
                                "  void bar();\n"
                                "}");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3196,7 +3196,7 @@
   Options options = Options::From("aidl --lang=java -I dir -I dir IFoo.aidl");
   io_delegate_.SetFileContents("dir/IBar.aidl", "interface IBar{}");
   io_delegate_.SetFileContents("IFoo.aidl", "import IBar; interface IFoo{}");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 }
 
 TEST_F(AidlTest, FailOnAmbiguousImports) {
@@ -3211,7 +3211,7 @@
   io_delegate_.SetFileContents("dir2/IBar.aidl", "interface IBar{}");
   io_delegate_.SetFileContents("IFoo.aidl", "import IBar; interface IFoo{}");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3225,7 +3225,7 @@
   io_delegate_.SetFileContents("a/b/IQux.aidl", "package a.b; interface IQux { void foo(); }");
 
   Options options = Options::From("aidl --lang=ndk a/b/IFoo.aidl -I . -o out -h out/include");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 
   string output;
   EXPECT_TRUE(io_delegate_.GetWrittenContents("out/include/aidl/a/b/IFoo.h", &output));
@@ -3255,7 +3255,7 @@
     })--");
 
   Options java_options = Options::From("aidl -I . --lang=java -o out a/IFoo.aidl a/MyEnum.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
 
   string java_out;
   EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/IFoo.java", &java_out));
@@ -3276,14 +3276,14 @@
   // Other backends shouldn't be bothered
   Options cpp_options =
       Options::From("aidl -I . --lang=cpp -o out -h out a/IFoo.aidl a/MyEnum.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(cpp_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_));
 
   Options ndk_options =
       Options::From("aidl -I . --lang=ndk -o out -h out a/IFoo.aidl a/MyEnum.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(ndk_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(ndk_options, io_delegate_));
 
   Options rust_options = Options::From("aidl -I . --lang=rust -o out a/IFoo.aidl a/MyEnum.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(rust_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(rust_options, io_delegate_));
 }
 
 TEST_F(AidlTest, ParseRustDerive) {
@@ -3294,7 +3294,7 @@
     })");
 
   Options rust_options = Options::From("aidl --lang=rust -o out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(rust_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(rust_options, io_delegate_));
 
   string rust_out;
   EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.rs", &rust_out));
@@ -3302,13 +3302,13 @@
 
   // Other backends shouldn't be bothered
   Options cpp_options = Options::From("aidl --lang=cpp -o out -h out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(cpp_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_));
 
   Options ndk_options = Options::From("aidl --lang=ndk -o out -h out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(ndk_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(ndk_options, io_delegate_));
 
   Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
 }
 
 class AidlOutputPathTest : public AidlTest {
@@ -3319,7 +3319,7 @@
   }
 
   void Test(const Options& options, const std::string expected_output_path) {
-    EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+    EXPECT_TRUE(compile_aidl(options, io_delegate_));
     // check the existence
     EXPECT_TRUE(io_delegate_.GetWrittenContents(expected_output_path, nullptr));
   }
@@ -3462,7 +3462,7 @@
   io_delegate_.SetFileContents("Baz.aidl",
                                "@JavaOnlyImmutable @JavaOnlyStableParcelable parcelable Baz;");
   Options options = Options::From("aidl --lang=java -I . Foo.aidl");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
 }
 
 TEST_F(AidlTest, RejectMutableParcelableFromJavaOnlyImmutableParcelable) {
@@ -3473,7 +3473,7 @@
       "named 'bar'.\n";
   CaptureStderr();
   Options options = Options::From("aidl --lang=java Foo.aidl -I .");
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_error, GetCapturedStderr());
 }
 
@@ -3482,7 +3482,7 @@
   io_delegate_.SetFileContents("Bar.aidl", "enum Bar { FOO }");
   CaptureStderr();
   Options options = Options::From("aidl --lang=java Foo.aidl -I .");
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -3494,7 +3494,7 @@
       "named 'bar'.\n";
   CaptureStderr();
   Options options = Options::From("aidl --lang=java Foo.aidl -I .");
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_error, GetCapturedStderr());
 }
 
@@ -3506,7 +3506,7 @@
       "only be an in parameter.\n";
   CaptureStderr();
   Options options = Options::From("aidl --lang=java IBar.aidl -I .");
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_error, GetCapturedStderr());
 }
 
@@ -3518,7 +3518,7 @@
       "only be an in parameter.\n";
   CaptureStderr();
   Options options = Options::From("aidl --lang=java IBar.aidl -I .");
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_error, GetCapturedStderr());
 }
 
@@ -3529,7 +3529,7 @@
       "ERROR: Foo.aidl:1.47-49: 'Foo' has duplicate field name 'A' after capitalizing the first "
       "letter\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3573,7 +3573,7 @@
   Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
   const string expected_stderr = "";
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3584,7 +3584,7 @@
       Options::From("aidl Foo.aidl --lang=" + to_string(Options::Language::CPP) + " -o out -h out");
   const string expected_stderr = "";
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 
   string code;
@@ -3603,7 +3603,7 @@
       Options::From("aidl Foo.aidl --lang=" + to_string(Options::Language::NDK) + " -o out -h out");
   const string expected_stderr = "";
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 
   string code;
@@ -3623,7 +3623,7 @@
   Options options = Options::From("aidl a/Foo.aidl -I . -o out --lang=java");
   const string expected_stderr = "";
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 
   string code;
@@ -3640,7 +3640,7 @@
   const string expected_stderr =
       "ERROR: a/Bar.aidl:1.28-37: Can only have one dimensional arrays.\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3652,7 +3652,7 @@
   const string expected_stderr =
       "ERROR: a/Bar.aidl:1.28-33: Can only specify one set of type parameters.\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3661,7 +3661,7 @@
 
   Options options = Options::From("aidl a/Bar.aidl -I . -o out --lang=java");
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), testing::HasSubstr("syntax error, unexpected '<'"));
 }
 
@@ -3671,7 +3671,7 @@
 
   Options options = Options::From("aidl a/Bar.aidl -I . -o out --lang=java");
   CaptureStderr();
-  EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), testing::HasSubstr("Annotations for arrays are not supported."));
 }
 
@@ -3681,7 +3681,7 @@
 
   Options options = Options::From("aidl a/Bar.aidl -I . -o out --lang=java");
   CaptureStderr();
-  EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(),
               testing::HasSubstr("Annotations for type arguments are not supported."));
 }
@@ -3696,7 +3696,7 @@
 
     Options options = Options::From(cmd);
     CaptureStderr();
-    EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+    EXPECT_TRUE(compile_aidl(options, io_delegate_));
     EXPECT_EQ("", GetCapturedStderr());
   }
 };
@@ -3725,7 +3725,7 @@
   const string expected_stderr =
       "ERROR: Foo.aidl:1.11-15: Every type parameter should be unique.\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3734,7 +3734,7 @@
   Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
   const string expected_stderr = "ERROR: Foo.aidl:1.22-24: Failed to resolve 'T'\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expected_stderr, GetCapturedStderr());
 }
 
@@ -3742,7 +3742,7 @@
   io_delegate_.SetFileContents("Foo.aidl", "enum Foo { FOO = (1 << 1) /* comment */ | 0x0 }");
   Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
   CaptureStderr();
-  EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -3759,7 +3759,7 @@
       "prohibited because it is not guaranteed that the objects in the list are recognizable in "
       "the receiving side. Consider switching to an array or a generic List/Map.\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expectedErr, GetCapturedStderr());
 }
 
@@ -3776,7 +3776,7 @@
       "prohibited because it is not guaranteed that the objects in the list are recognizable in "
       "the receiving side. Consider switching to an array or a generic List/Map.\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expectedErr, GetCapturedStderr());
 }
 
@@ -3795,7 +3795,7 @@
       "prohibited because it is not guaranteed that the objects in the list are recognizable in "
       "the receiving side. Consider switching to an array or a generic List/Map.\n";
   CaptureStderr();
-  EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(expectedErr, GetCapturedStderr());
 }
 
@@ -3809,7 +3809,7 @@
 })");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang java -o out a/p/Foo.aidl");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("", err);
 
@@ -3828,7 +3828,7 @@
 })");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang cpp -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("", err);
 
@@ -3847,7 +3847,7 @@
 })");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang ndk -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("", err);
 
@@ -3867,7 +3867,7 @@
 })");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang rust -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("", err);
 
@@ -3940,7 +3940,7 @@
 })");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang java -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("ERROR: a/p/Foo.aidl:5.11-20: Invalid value (Enum.FOO|Enum.BAR) for enum p.Enum\n",
             err);
@@ -3956,7 +3956,7 @@
 })");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang java -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("Invalid value (1) for enum p.Enum"));
 }
 
@@ -3966,7 +3966,7 @@
   CaptureStderr();
   auto options =
       Options::From("aidl -I a --lang " + to_string(GetLanguage()) + " -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("", err);
 }
@@ -3980,7 +3980,7 @@
   CaptureStderr();
   auto options =
       Options::From("aidl --lang " + to_string(GetLanguage()) + " -o out -h out a/p/IFoo.aidl");
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ(
       "ERROR: a/p/IFoo.aidl:3.31-41: Value must be a constant expression but contains reference to "
@@ -3995,7 +3995,7 @@
   io_delegate_.SetFileContents("a/p/Bar.aidl", "package p; enum Bar { FOO, BAR }");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang ndk -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("", err);
   string code;
@@ -4009,7 +4009,7 @@
   io_delegate_.SetFileContents("a/p/Foo.aidl", "package p; enum Foo { A = B, B }");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang ndk -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("ERROR: a/p/Foo.aidl:1.26-28: Found a circular reference: B -> A -> B\n", err);
 }
@@ -4019,7 +4019,7 @@
                                "package p; parcelable Foo { const int A = A + 1; }");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang ndk -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   auto err = GetCapturedStderr();
   EXPECT_EQ("ERROR: a/p/Foo.aidl:1.42-44: Found a circular reference: A -> A\n", err);
 }
@@ -4032,7 +4032,7 @@
   io_delegate_.SetFileContents("a/p/Baz.aidl", "package p; parcelable Baz { const int A = 1; }");
   CaptureStderr();
   auto options = Options::From("aidl -I a --lang ndk -o out -h out a/p/Foo.aidl");
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -4042,7 +4042,7 @@
       Options::From("aidl --lang " + to_string(GetLanguage()) + " -I . -o out -h out Foo.aidl");
   const string err = "ERROR: Foo.aidl:1.15-21: Found a circular reference: Foo.A -> Foo.A\n";
   CaptureStderr();
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(err, GetCapturedStderr());
 }
 
@@ -4053,7 +4053,7 @@
   auto options =
       Options::From("aidl --lang " + to_string(GetLanguage()) + " -I . -o out -h out Bar.aidl");
   CaptureStderr();
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("", GetCapturedStderr());
 }
 
@@ -4066,7 +4066,7 @@
       "ERROR: Foo.aidl:1.38-50: Can't find UNKNOWN_REF in Foo\n"
       "ERROR: Foo.aidl:1.38-50: Unknown reference 'UNKNOWN_REF'\n";
   CaptureStderr();
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ(err, GetCapturedStderr());
 }
 
@@ -4084,7 +4084,7 @@
   auto options = Options::From("aidl --lang " + to_string(GetLanguage()) +
                                " -Weverything -o out -h out p/Foo.aidl");
   CaptureStderr();
-  EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_TRUE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("WARNING: p/Foo.aidl:1.1-10: Interface names should start with I. [-Winterface-name]\n",
             GetCapturedStderr());
 }
@@ -4094,7 +4094,7 @@
   auto options = Options::From("aidl --lang " + to_string(GetLanguage()) +
                                " -Weverything -Werror -o out -h out p/Foo.aidl");
   CaptureStderr();
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_EQ("ERROR: p/Foo.aidl:1.1-10: Interface names should start with I. [-Winterface-name]\n",
             GetCapturedStderr());
 }
@@ -4108,7 +4108,7 @@
 
   auto options = Options::From({"aidl-cpp", input_file, header_dir, output_file});
   CaptureStderr();
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(
       GetCapturedStderr(),
       testing::StartsWith(
@@ -4160,7 +4160,7 @@
                                "}");
   auto options = Options::From("aidl --lang=java IFoo.aidl");
   CaptureStderr();
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("@Hide is not available"));
 }
 
@@ -4172,7 +4172,7 @@
       "}");
   auto options = Options::From("aidl --lang=java IFoo.aidl");
   CaptureStderr();
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("@SuppressWarnings is not available"));
 }
 
@@ -4180,7 +4180,7 @@
   io_delegate_.SetFileContents("p/IFoo.aidl", "interface IFoo{ void j(void n);}");
   auto options = Options::From("aidl --lang=java -o out p/IFoo.aidl");
   CaptureStderr();
-  EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
+  EXPECT_FALSE(compile_aidl(options, io_delegate_));
   EXPECT_THAT(GetCapturedStderr(), HasSubstr("'void' is an invalid type for the parameter 'n'"));
 }