Lines Matching refs:io_delegate_
91 io_delegate_.SetFileContents(path, contents);
107 ImportResolver import_resolver{io_delegate_, path, import_paths_, {}};
109 path, options, io_delegate_, &typenames_, &imported_files);
127 FakeIoDelegate io_delegate_; member in android::aidl::AidlTest
188 io_delegate_.SetFileContents("bar/IBar.aidl", in TEST_P()
432 io_delegate_.SetFileContents( in TEST_F()
436 EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
437 EXPECT_EQ(0, ::android::aidl::compile_aidl(cpp_options, io_delegate_)); in TEST_F()
442 EXPECT_NE(0, ::android::aidl::compile_aidl(cpp_structured_options, io_delegate_)); in TEST_F()
446 EXPECT_NE(0, ::android::aidl::compile_aidl(rust_options, io_delegate_)); in TEST_F()
451 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
454 EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
457 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &java_out)); in TEST_F()
462 EXPECT_EQ(0, ::android::aidl::compile_aidl(cpp_options, io_delegate_)); in TEST_F()
465 EXPECT_EQ(0, ::android::aidl::compile_aidl(ndk_options, io_delegate_)); in TEST_F()
469 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
473 EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
488 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &java_out)); in TEST_F()
493 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
497 EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
519 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &java_out)); in TEST_F()
524 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
528 EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
550 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &java_out)); in TEST_F()
556 io_delegate_.SetFileContents("a/Foo.aidl", in TEST_F()
560 EXPECT_NE(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
568 io_delegate_.SetFileContents("a/IFoo.aidl", "package a; @JavaDerive interface IFoo{}"); in TEST_F()
571 EXPECT_NE(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
576 io_delegate_.SetFileContents("a/IFoo.aidl", "package a; @JavaDerive enum IFoo { A=1, }"); in TEST_F()
579 EXPECT_NE(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
657 io_delegate_.SetFileContents("p/cpp_header.aidl", in TEST_P()
677 io_delegate_.SetFileContents("path", simple_content); in TEST_F()
679 EXPECT_TRUE(parse_preprocessed_file(io_delegate_, "path", &typenames_)); in TEST_F()
686 io_delegate_.SetFileContents("path", simple_content); in TEST_F()
689 EXPECT_TRUE(parse_preprocessed_file(io_delegate_, "path", &typenames_)); in TEST_F()
695 io_delegate_.SetFileContents("preprocessed", "interface another.IBar;"); in TEST_P()
696 io_delegate_.SetFileContents("one/IBar.aidl", "package one; " in TEST_P()
716 io_delegate_.SetFileContents("preprocessed", "interface another.IBar;\ninterface one.IBar;"); in TEST_P()
717 io_delegate_.SetFileContents("one/IBar.aidl", in TEST_P()
736 io_delegate_.SetFileContents("p/Outer.aidl", in TEST_F()
738 io_delegate_.SetFileContents("one/IBar.aidl", "package one; import p.Outer;" in TEST_F()
748 EXPECT_TRUE(::android::aidl::preprocess_aidl(options, io_delegate_)); in TEST_F()
751 EXPECT_TRUE(io_delegate_.GetWrittenContents("preprocessed", &output)); in TEST_F()
763 io_delegate_.SetFileContents(filename, contents); in TEST_P()
767 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
771 EXPECT_TRUE(io_delegate_.GetWrittenContents(test_case.output_file, &output)); in TEST_P()
906 io_delegate_.SetFileContents("p/Outer.aidl", in TEST_P()
917 io_delegate_.SetFileContents("preprocessed", in TEST_P()
933 io_delegate_.SetFileContents("p/IFoo.aidl", "package p; parcelable IFoo;"); in TEST_F()
938 EXPECT_EQ(0, ::android::aidl::compile_aidl(options1, io_delegate_)); in TEST_F()
944 EXPECT_NE(0, ::android::aidl::compile_aidl(options2, io_delegate_)); in TEST_F()
951 io_delegate_.SetFileContents("p/IBar.aidl", "package p; parcelable Foo; interface IBar{}"); in TEST_F()
956 EXPECT_EQ(0, ::android::aidl::compile_aidl(options3, io_delegate_)); in TEST_F()
960 EXPECT_NE(0, ::android::aidl::compile_aidl(options4, io_delegate_)); in TEST_F()
968 io_delegate_.SetFileContents("o/WhoKnowsWhat.aidl", "package o; parcelable WhoKnowsWhat;"); in TEST_P()
1015 io_delegate_.SetFileContents("a/Foo.aidl", "package a; parcelable Foo { const int y = true; }"); in TEST_F()
1018 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1021 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &code)); in TEST_F()
1175 io_delegate_.SetFileContents( in TEST_P()
1193 io_delegate_.SetFileContents( in TEST_P()
1224 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}"); in TEST_F()
1225 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1227 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
1242 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}"); in TEST_F()
1243 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1245 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
1261 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;"); in TEST_F()
1262 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1264 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
1276 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo {int a;}"); in TEST_F()
1277 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1279 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
1290 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;"); in TEST_F()
1291 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1293 EXPECT_FALSE(io_delegate_.GetWrittenContents(options.OutputFile(), &output_file_contents)); in TEST_F()
1399 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { @nullable ParcelableHolder ext; }"); in TEST_P()
1403 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
1416 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { const int BIT = 0x1 << 3; }"); in TEST_P()
1419 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
1424 io_delegate_.SetFileContents("Foo.aidl", "union Foo { const int BIT = 0x1 << 3; int n; }"); in TEST_P()
1427 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
1432 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
1439 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1442 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/IFoo.java", &code)); in TEST_F()
1448 io_delegate_.SetFileContents( in TEST_F()
1468 io_delegate_.SetFileContents("foo/bar/Data.aidl", in TEST_F()
1482 io_delegate_.SetFileContents("api.aidl", ""); in TEST_F()
1486 bool result = dump_api(options, io_delegate_); in TEST_F()
1489 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/IFoo.aidl", &actual)); in TEST_F()
1509 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Data.aidl", &actual)); in TEST_F()
1523 io_delegate_.SetFileContents( in TEST_F()
1534 bool result = dump_api(options, io_delegate_); in TEST_F()
1537 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/IFoo.aidl", &actual)); in TEST_F()
1551 io_delegate_.SetFileContents( in TEST_F()
1563 EXPECT_FALSE(dump_api(options, io_delegate_)); in TEST_F()
1568 io_delegate_.SetFileContents("foo/bar/IFoo.aidl", in TEST_F()
1578 EXPECT_TRUE(dump_api(options, io_delegate_)); in TEST_F()
1581 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/IFoo.aidl", &actual)); in TEST_F()
1592 io_delegate_.SetFileContents("foo/bar/Enum.aidl", in TEST_F()
1602 EXPECT_TRUE(dump_api(options, io_delegate_)); in TEST_F()
1605 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Enum.aidl", &actual)); in TEST_F()
1615 io_delegate_.SetFileContents("foo/bar/Enum.aidl", in TEST_F()
1620 io_delegate_.SetFileContents("foo/bar/Foo.aidl", in TEST_F()
1630 EXPECT_TRUE(dump_api(options, io_delegate_)); in TEST_F()
1633 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Foo.aidl", &actual)); in TEST_F()
1642 io_delegate_.SetFileContents("foo/bar/Foo.aidl", in TEST_F()
1650 EXPECT_TRUE(dump_api(options, io_delegate_)); in TEST_F()
1653 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Foo.aidl", &actual)); in TEST_F()
1667 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1671 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1674 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1678 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1686 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar { String s; }"); in TEST_F()
1688 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1691 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1693 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1697 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1700 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1703 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1705 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1708 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1714 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1718 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1724 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T, T>;"); in TEST_F()
1726 EXPECT_NE(0, ::android::aidl::compile_aidl(optionsForParcelable, io_delegate_)); in TEST_F()
1731 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar;"); in TEST_F()
1732 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1736 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1738 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T>;"); in TEST_F()
1740 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1743 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T, V>;"); in TEST_F()
1744 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1745 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1748 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1750 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1754 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1758 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1769 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1776 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1779 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1784 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1788 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1793 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1810 io_delegate_.SetFileContents(options.InputFiles().at(0), in TEST_F()
1815 io_delegate_.SetFileContents(options.InputFiles().at(1), in TEST_F()
1820 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1826 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
1835 io_delegate_.SetFileContents(options.InputFiles().at(0), in TEST_F()
1840 io_delegate_.SetFileContents(options.InputFiles().at(1), in TEST_F()
1845 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1854 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
1863 io_delegate_.SetFileContents(options.InputFiles().at(0), in TEST_F()
1868 io_delegate_.SetFileContents(options.InputFiles().at(1), in TEST_F()
1873 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1878 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
1888 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1892 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1902 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1906 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1915 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1919 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1923 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
1926 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1933 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
1935 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1938 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1944 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
1946 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1949 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1954 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{ void foo();}"); in TEST_F()
1955 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo();}"); in TEST_F()
1957 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1964 io_delegate_.SetFileContents("old/p/Foo.aidl", foo_definition); in TEST_F()
1965 io_delegate_.SetFileContents("old/p/Enum.aidl", enum_definition); in TEST_F()
1966 io_delegate_.SetFileContents("new/p/Foo.aidl", foo_definition); in TEST_F()
1967 io_delegate_.SetFileContents("new/p/Enum.aidl", enum_definition); in TEST_F()
1969 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1976 io_delegate_.SetFileContents("old/p/Foo.aidl", foo_definition); in TEST_F()
1977 io_delegate_.SetFileContents("old/p/Enum.aidl", enum_definition); in TEST_F()
1978 io_delegate_.SetFileContents("new/p/Foo.aidl", foo_definition); in TEST_F()
1979 io_delegate_.SetFileContents("new/p/Enum.aidl", enum_definition); in TEST_F()
1981 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1991 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
1996 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2001 io_delegate_.SetFileContents("new/p/IBar.aidl", in TEST_F()
2006 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2010 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2015 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2022 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2026 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2031 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2038 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2042 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2046 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2051 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2055 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
2060 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
2066 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2070 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
2076 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
2082 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2086 io_delegate_.SetFileContents("old/p/Union.aidl", in TEST_F()
2091 io_delegate_.SetFileContents("new/p/Union.aidl", in TEST_F()
2097 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2101 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2106 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2111 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2116 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2121 io_delegate_.SetFileContents("new/q/IFoo.aidl", in TEST_F()
2126 io_delegate_.SetFileContents("new/q/Data.aidl", in TEST_F()
2131 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2135 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2140 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2145 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2149 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
2152 io_delegate_.SetFileContents("new/p/I.aidl", in TEST_F()
2155 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2159 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
2162 io_delegate_.SetFileContents("new/p/I.aidl", in TEST_F()
2165 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2169 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
2174 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
2179 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2183 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
2186 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
2190 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2194 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2199 io_delegate_.SetFileContents( in TEST_F()
2206 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
2212 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2216 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2221 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
2227 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2232 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
2238 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2248 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2255 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2262 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2268 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2274 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2285 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2290 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2297 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2308 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2313 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2320 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2327 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2333 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2339 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2351 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2356 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2363 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2371 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2376 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2382 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
2389 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2396 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
2402 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
2408 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2415 io_delegate_.SetFileContents("old/p/Union.aidl", in TEST_F()
2421 io_delegate_.SetFileContents("new/p/Union.aidl", in TEST_F()
2427 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2434 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2440 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2447 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2453 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2459 io_delegate_.SetFileContents("new/p/IFoo2.aidl", in TEST_F()
2466 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2473 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
2479 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
2486 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2496 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2502 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2509 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2517 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
2523 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
2530 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2536 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2542 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2549 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2556 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2562 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2569 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2576 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
2582 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
2589 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2597 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
2603 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
2610 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2618 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
2622 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
2628 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2635 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
2640 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
2646 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2653 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
2658 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
2664 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2670 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{}"); in TEST_F()
2671 io_delegate_.SetFileContents("old/q/IFoo.aidl", "package q; interface IFoo{}"); in TEST_F()
2672 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{}"); in TEST_F()
2674 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2680 io_delegate_.SetFileContents("old/p/D.aidl", "package p; parcelable D { int a = 1; }"); in TEST_F()
2681 io_delegate_.SetFileContents("new/p/D.aidl", "package p; parcelable D { int a = 2; }"); in TEST_F()
2683 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2690 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
2693 io_delegate_.SetFileContents("new/p/I.aidl", "package p; interface I { const int A = 1; }"); in TEST_F()
2695 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2702 io_delegate_.SetFileContents("old/p/I.aidl", "package p; interface I { const int A = 1; }"); in TEST_F()
2703 io_delegate_.SetFileContents("new/p/I.aidl", "package p; interface I { const int A = 2; }"); in TEST_F()
2705 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2713 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
2715 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
2718 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2727 io_delegate_.SetFileContents("old/android/net/UidRangeParcel.aidl", in TEST_F()
2729 io_delegate_.SetFileContents( in TEST_F()
2733 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2740 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
2742 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
2745 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
2764 io_delegate_.SetFileContents("Foo.aidl", in TEST_P()
2774 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { int a; }"); in TEST_P()
2778 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
2785 io_delegate_.SetFileContents("Foo.aidl", "@FixedSize parcelable Foo { int a; Bar b; }"); in TEST_P()
2786 io_delegate_.SetFileContents("Bar.aidl", "@FixedSize parcelable Bar { Val c; }"); in TEST_P()
2787 io_delegate_.SetFileContents("Val.aidl", "enum Val { A, B, }"); in TEST_P()
2791 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
2802 io_delegate_.SetFileContents("p/IFoo.aidl", "package p; import q.IBar; interface IFoo{}"); in TEST_F()
2803 io_delegate_.SetFileContents("dir1/q/IBar.aidl", "package q; interface IBar{}"); in TEST_F()
2804 io_delegate_.SetFileContents("dir2/q/IBar.aidl", "package q; interface IBar{}"); in TEST_F()
2807 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2816 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 10;}"); in TEST_F()
2817 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 10;}"); in TEST_F()
2819 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
2821 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 11;}"); in TEST_F()
2823 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
2832 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_P()
2834 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
2837 map<string, string> outputs = io_delegate_.OutputFiles(); in TEST_P()
2840 io_delegate_.SetFileContents( in TEST_P()
2843 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
2845 EXPECT_EQ(outputs, io_delegate_.OutputFiles()); in TEST_P()
2848 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_P()
2854 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
2856 EXPECT_EQ(outputs, io_delegate_.OutputFiles()); in TEST_P()
2862 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_P()
2867 EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
2874 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_P()
2879 EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
2886 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
2891 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2896 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
2901 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2908 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
2914 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2924 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
2930 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2938 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
2944 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2950 io_delegate_.SetFileContents("dir/IBar.aidl", "interface IBar{}"); in TEST_F()
2951 io_delegate_.SetFileContents("IFoo.aidl", "import IBar; interface IFoo{}"); in TEST_F()
2952 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2963 io_delegate_.SetFileContents("dir/IBar.aidl", "interface IBar{}"); in TEST_F()
2964 io_delegate_.SetFileContents("dir2/IBar.aidl", "interface IBar{}"); in TEST_F()
2965 io_delegate_.SetFileContents("IFoo.aidl", "import IBar; interface IFoo{}"); in TEST_F()
2967 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2972 io_delegate_.SetFileContents("a/b/IFoo.aidl", in TEST_F()
2977 io_delegate_.SetFileContents("a/b/IBar.aidl", "package a.b; interface IBar { void foo(); }"); in TEST_F()
2978 io_delegate_.SetFileContents("a/b/IQux.aidl", "package a.b; interface IQux { void foo(); }"); in TEST_F()
2981 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
2984 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/include/aidl/a/b/IFoo.h", &output)); in TEST_F()
2992 io_delegate_.SetFileContents("a/IFoo.aidl", R"--(package a; in TEST_F()
3002 io_delegate_.SetFileContents("a/MyEnum.aidl", R"--(package a; in TEST_F()
3011 EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
3014 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/IFoo.java", &java_out)); in TEST_F()
3024 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/MyEnum.java", &java_out)); in TEST_F()
3032 EXPECT_EQ(0, ::android::aidl::compile_aidl(cpp_options, io_delegate_)); in TEST_F()
3036 EXPECT_EQ(0, ::android::aidl::compile_aidl(ndk_options, io_delegate_)); in TEST_F()
3039 EXPECT_EQ(0, ::android::aidl::compile_aidl(rust_options, io_delegate_)); in TEST_F()
3043 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
3050 EXPECT_EQ(0, ::android::aidl::compile_aidl(rust_options, io_delegate_)); in TEST_F()
3053 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.rs", &rust_out)); in TEST_F()
3058 EXPECT_EQ(0, ::android::aidl::compile_aidl(cpp_options, io_delegate_)); in TEST_F()
3061 EXPECT_EQ(0, ::android::aidl::compile_aidl(ndk_options, io_delegate_)); in TEST_F()
3064 EXPECT_EQ(0, ::android::aidl::compile_aidl(java_options, io_delegate_)); in TEST_F()
3071 io_delegate_.SetFileContents("sub/dir/foo/bar/IFoo.aidl", "package foo.bar; interface IFoo {}"); in SetUp()
3075 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in Test()
3077 EXPECT_TRUE(io_delegate_.GetWrittenContents(expected_output_path, nullptr)); in Test()
3211 io_delegate_.SetFileContents("Foo.aidl", in TEST_F()
3214 io_delegate_.SetFileContents("Bar.aidl", "@JavaOnlyImmutable parcelable Bar { String a; }"); in TEST_F()
3215 io_delegate_.SetFileContents("Baz.aidl", in TEST_F()
3218 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3222 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { Bar bar; }"); in TEST_F()
3223 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { String a; }"); in TEST_F()
3229 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3234 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { Bar bar; }"); in TEST_F()
3235 io_delegate_.SetFileContents("Bar.aidl", "enum Bar { FOO }"); in TEST_F()
3238 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3243 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable union Foo { Bar bar; }"); in TEST_F()
3244 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { String a; }"); in TEST_F()
3250 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3255 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { int a; }"); in TEST_F()
3256 io_delegate_.SetFileContents("IBar.aidl", "interface IBar { void my(inout Foo foo); }"); in TEST_F()
3262 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3267 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { int a; }"); in TEST_F()
3268 io_delegate_.SetFileContents("IBar.aidl", "interface IBar { void my(out Foo foo); }"); in TEST_F()
3274 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3279 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { int a; int A; }"); in TEST_F()
3285 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3291 io_delegate_.SetFileContents("Bar.aidl", "union Bar { int n = 42; long l; }"); in TEST_P()
3316 io_delegate_.SetFileContents("a/Enum.aidl", "package a; enum Enum { FOO, BAR }"); in TEST_P()
3325 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T, U> { int a; int A; }"); in TEST_P()
3329 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3334 io_delegate_.SetFileContents("Foo.aidl", in TEST_F()
3340 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3344 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/Foo.h", &code)); in TEST_F()
3353 io_delegate_.SetFileContents("Foo.aidl", in TEST_F()
3359 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3363 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/aidl/Foo.h", &code)); in TEST_F()
3370 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar<A> { }"); in TEST_F()
3371 io_delegate_.SetFileContents("a/Baz.aidl", "package a; parcelable Baz<A, B> { }"); in TEST_F()
3373 io_delegate_.SetFileContents("a/Foo.aidl", in TEST_F()
3379 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3383 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &code)); in TEST_F()
3390 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { String[][] a; }"); in TEST_F()
3396 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3401 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
3408 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3413 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { List[]<String> a; }"); in TEST_F()
3417 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3422 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
3427 EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3432 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
3437 EXPECT_EQ(1, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3443 FakeIoDelegate io_delegate_; member
3445 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { Bar<Baz<Qux>> x; }"); in Compile()
3446 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar<T> { }"); in Compile()
3447 io_delegate_.SetFileContents("Baz.aidl", "parcelable Baz<T> { }"); in Compile()
3448 io_delegate_.SetFileContents("Qux.aidl", "parcelable Qux { }"); in Compile()
3452 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in Compile()
3460 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/Foo.h", &code)); in TEST_F()
3469 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/aidl/Foo.h", &code)); in TEST_F()
3476 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T,T> { int a; int A; }"); in TEST_P()
3481 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3486 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T,T> { T a; int A; }"); in TEST_P()
3490 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3495 io_delegate_.SetFileContents("Foo.aidl", "enum Foo { FOO = (1 << 1) /* comment */ | 0x0 }"); in TEST_P()
3498 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3503 io_delegate_.SetFileContents("a/Foo.aidl", "package a; union Foo { List l; Map m; }"); in TEST_F()
3515 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3520 io_delegate_.SetFileContents("a/Foo.aidl", "package a; parcelable Foo { List l; Map m; }"); in TEST_F()
3532 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3537 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar<T>;"); in TEST_F()
3538 io_delegate_.SetFileContents( in TEST_F()
3551 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3556 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO, BAR }"); in TEST_F()
3557 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
3565 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3570 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/p/Foo.java", &code)); in TEST_F()
3575 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO, BAR }"); in TEST_F()
3576 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
3584 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3589 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/p/Foo.h", &code)); in TEST_F()
3594 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO, BAR }"); in TEST_F()
3595 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
3603 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3608 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/aidl/p/Foo.h", &code)); in TEST_F()
3613 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO, BAR }"); in TEST_F()
3614 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
3623 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3628 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/p/Foo.rs", &code)); in TEST_F()
3640 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO = 1, BAR = 2}"); in TEST_P()
3687 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO = 1, BAR = 2}"); in TEST_F()
3688 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
3696 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3703 io_delegate_.SetFileContents("a/p/Foo.aidl", "package p; parcelable Foo { p.Bar[] bars = {}; }"); in TEST_P()
3704 io_delegate_.SetFileContents("a/p/Bar.aidl", "package p; parcelable Bar { }"); in TEST_P()
3708 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3714 io_delegate_.SetFileContents("a/p/IFoo.aidl", in TEST_P()
3722 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3731 io_delegate_.SetFileContents( in TEST_F()
3734 io_delegate_.SetFileContents("a/p/Bar.aidl", "package p; enum Bar { FOO, BAR }"); in TEST_F()
3737 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3741 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/aidl/p/Foo.h", &code)); in TEST_F()
3748 io_delegate_.SetFileContents("a/p/Foo.aidl", "package p; enum Foo { A = B, B }"); in TEST_F()
3751 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3760 io_delegate_.SetFileContents("a/p/Foo.aidl", in TEST_F()
3764 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3770 io_delegate_.SetFileContents("a/p/Foo.aidl", in TEST_F()
3772 io_delegate_.SetFileContents("a/p/Bar.aidl", in TEST_F()
3774 io_delegate_.SetFileContents("a/p/Baz.aidl", "package p; parcelable Baz { const int A = 1; }"); in TEST_F()
3777 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3782 io_delegate_.SetFileContents("Foo.aidl", " parcelable Foo { UnknownType field = UNKNOWN_REF; }"); in TEST_P()
3790 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3804 io_delegate_.SetFileContents("p/Foo.aidl", "interface Foo {}"); in TEST_P()
3808 EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3814 io_delegate_.SetFileContents("p/Foo.aidl", "interface Foo {}"); in TEST_P()
3818 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_P()
3828 io_delegate_.SetFileContents(input_file, "package " + package + "; interface IFoo {}"); in TEST_F()
3832 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3878 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
3884 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_F()
3889 io_delegate_.SetFileContents( in TEST_F()
3896 EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_)); in TEST_F()