Lines Matching refs:io_delegate_

102     io_delegate_.SetFileContents(path, contents);
120 ImportResolver import_resolver{io_delegate_, path, import_paths_};
122 path, options, io_delegate_, &typenames_, &imported_files);
156 FakeIoDelegate io_delegate_; member in android::aidl::AidlTest
281 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { Foo foo; }"); in TEST_P()
290 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { @nullable Foo foo; }"); in TEST_P()
511 io_delegate_.SetFileContents( in TEST_F()
515 EXPECT_TRUE(compile_aidl(java_options, io_delegate_)); in TEST_F()
516 EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_)); in TEST_F()
519 EXPECT_FALSE(compile_aidl(cpp_structured_options, io_delegate_)); in TEST_F()
523 EXPECT_FALSE(compile_aidl(rust_options, io_delegate_)); in TEST_F()
533 io_delegate_.SetFileContents( in TEST_F()
537 EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_)); in TEST_F()
542 EXPECT_FALSE(compile_aidl(ndk_structured_options, io_delegate_)); in TEST_F()
547 EXPECT_FALSE(compile_aidl(java_options, io_delegate_)); in TEST_F()
551 EXPECT_FALSE(compile_aidl(rust_options, io_delegate_)); in TEST_F()
558 io_delegate_.SetFileContents( in TEST_P()
582 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
585 EXPECT_TRUE(compile_aidl(java_options, io_delegate_)); in TEST_F()
588 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &java_out)); in TEST_F()
593 EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_)); in TEST_F()
596 EXPECT_TRUE(compile_aidl(ndk_options, io_delegate_)); in TEST_F()
600 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
604 EXPECT_TRUE(compile_aidl(java_options, io_delegate_)); in TEST_F()
609 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
613 EXPECT_TRUE(compile_aidl(java_options, io_delegate_)); in TEST_F()
635 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &java_out)); in TEST_F()
640 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
644 EXPECT_TRUE(compile_aidl(java_options, io_delegate_)); in TEST_F()
666 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &java_out)); in TEST_F()
672 io_delegate_.SetFileContents("a/Foo.aidl", in TEST_F()
676 EXPECT_FALSE(compile_aidl(java_options, io_delegate_)); in TEST_F()
684 io_delegate_.SetFileContents("a/IFoo.aidl", "package a; @JavaDerive interface IFoo{}"); in TEST_F()
687 EXPECT_FALSE(compile_aidl(java_options, io_delegate_)); in TEST_F()
764 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
766 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
769 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
800 io_delegate_.SetFileContents("p/cpp_header.aidl", in TEST_P()
820 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo;"); in TEST_F()
823 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
828 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo;"); in TEST_F()
829 io_delegate_.SetFileContents("IBar.aidl", "interface IBar { void bar(in Foo foo); }"); in TEST_F()
832 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
838 io_delegate_.SetFileContents("path", simple_content); in TEST_F()
840 EXPECT_TRUE(Parser::Parse("path", io_delegate_, typenames_, /*is_preprocessed=*/true)); in TEST_F()
847 io_delegate_.SetFileContents("path", simple_content); in TEST_F()
850 EXPECT_TRUE(Parser::Parse("path", io_delegate_, typenames_, /*is_preprocessed=*/true)); in TEST_F()
856 io_delegate_.SetFileContents("preprocessed", "interface another.IBar;"); in TEST_P()
857 io_delegate_.SetFileContents("one/IBar.aidl", "package one; " in TEST_P()
877 io_delegate_.SetFileContents("preprocessed", "interface another.IBar;\ninterface one.IBar;"); in TEST_P()
878 io_delegate_.SetFileContents("one/IBar.aidl", in TEST_P()
897 io_delegate_.SetFileContents("p/Outer.aidl", in TEST_F()
899 io_delegate_.SetFileContents("one/IBar.aidl", "package one; import p.Outer;" in TEST_F()
905 EXPECT_TRUE(::android::aidl::Preprocess(options, io_delegate_)); in TEST_F()
911 EXPECT_THAT(io_delegate_.OutputFiles(), testing::Eq(expected)); in TEST_F()
915 io_delegate_.SetFileContents("foo/bar/IFoo.aidl", in TEST_F()
921 io_delegate_.SetFileContents("foo/bar/Bar.aidl", in TEST_F()
927 io_delegate_.SetFileContents("foo/bar/Gen.aidl", in TEST_F()
931 io_delegate_.SetFileContents("foo/bar/Enum.aidl", in TEST_F()
936 io_delegate_.SetFileContents("sub/imported/Foo.aidl", in TEST_F()
953 ASSERT_TRUE(Preprocess(Options::From(args), io_delegate_)); in TEST_F()
968 EXPECT_THAT(io_delegate_.OutputFiles(), testing::Eq(expected)); in TEST_F()
971 io_delegate_.SetFileContents("a/Foo.aidl", in TEST_F()
973 io_delegate_.SetFileContents("preprocessed", preprocessed); in TEST_F()
976 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
979 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &code)); in TEST_F()
984 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
990 io_delegate_.SetFileContents("imported/x/Outer.aidl", in TEST_F()
996 EXPECT_TRUE(compile_aidl(opt, io_delegate_)); in TEST_F()
1004 io_delegate_.SetFileContents("sdk/framework.aidl", "parcelable x.Foo.Inner;\n"); in TEST_F()
1005 io_delegate_.SetFileContents("x/Foo.aidl", in TEST_F()
1010 EXPECT_TRUE(compile_aidl(opt, io_delegate_)); in TEST_F()
1019 io_delegate_.SetFileContents("sdk/framework.aidl", "parcelable x.Foo.Inner;\n"); in TEST_F()
1020 io_delegate_.SetFileContents("x/IBar.aidl", in TEST_F()
1026 io_delegate_.SetFileContents("x/Foo.aidl", in TEST_F()
1031 EXPECT_TRUE(compile_aidl(opt, io_delegate_)); in TEST_F()
1037 io_delegate_.SetFileContents("path", simple_content); in TEST_F()
1039 EXPECT_FALSE(Parser::Parse("path", io_delegate_, typenames_, /*is_preprocessed=*/true)); in TEST_F()
1045 io_delegate_.SetFileContents("path", simple_content); in TEST_F()
1047 EXPECT_FALSE(Parser::Parse("path", io_delegate_, typenames_, /*is_preprocessed=*/false)); in TEST_F()
1057 io_delegate_.SetFileContents("path", contents); in TEST_P()
1059 EXPECT_TRUE(Parser::Parse("path", io_delegate_, typenames_, /*is_preprocessed=*/true)); in TEST_P()
1071 io_delegate_.SetFileContents(filename, contents); in TEST_P()
1075 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
1079 EXPECT_TRUE(io_delegate_.GetWrittenContents(test_case.output_file, &output)); in TEST_P()
1228 io_delegate_.SetFileContents("p/Outer.aidl", in TEST_P()
1239 io_delegate_.SetFileContents("preprocessed", in TEST_P()
1250 io_delegate_.SetFileContents("p/Foo.aidl", "package p; parcelable Foo;"); in TEST_F()
1254 EXPECT_EQ(0, aidl_entry(options1, io_delegate_)); in TEST_F()
1263 io_delegate_.SetFileContents("p/IFoo.aidl", "package p; parcelable IFoo;"); in TEST_F()
1268 EXPECT_TRUE(compile_aidl(options1, io_delegate_)); in TEST_F()
1274 EXPECT_FALSE(compile_aidl(options2, io_delegate_)); in TEST_F()
1281 io_delegate_.SetFileContents("p/IBar.aidl", "package p; parcelable Foo; interface IBar{}"); in TEST_F()
1286 EXPECT_TRUE(compile_aidl(options3, io_delegate_)); in TEST_F()
1290 EXPECT_FALSE(compile_aidl(options4, io_delegate_)); in TEST_F()
1308 io_delegate_.SetFileContents("o/WhoKnowsWhat.aidl", in TEST_P()
1441 EXPECT_EQ(compile_aidl(options, io_delegate_), !reject_unstructured_parcelables);
1467 io_delegate_.SetFileContents("a/Foo.aidl", "package a; parcelable Foo { const int y = true; }"); in TEST_F()
1470 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
1473 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &code)); in TEST_F()
1793 io_delegate_.SetFileContents("p/Outer.aidl", in TEST_P()
1812 io_delegate_.SetFileContents("p/Outer.aidl", in TEST_P()
1830 io_delegate_.SetFileContents("p/IOuter.aidl", in TEST_F()
1889 io_delegate_.SetFileContents("p/IOuter.aidl", in TEST_F()
1924 io_delegate_.SetFileContents("p/IOuter.aidl", in TEST_F()
1982 io_delegate_.SetFileContents("q/IBar.aidl", in TEST_F()
2185 io_delegate_.SetFileContents(input_path, input); in TEST_F()
2187 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2191 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/p/IFoo.h", &code)); in TEST_F()
2226 io_delegate_.SetFileContents(input_path, input); in TEST_F()
2228 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2236 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2239 io_delegate_.SetFileContents("p/IBar.aidl", in TEST_F()
2242 io_delegate_.SetFileContents("p/IQux.aidl", in TEST_F()
2246 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2255 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2258 io_delegate_.SetFileContents("p/Bar.aidl", in TEST_F()
2262 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2319 io_delegate_.SetFileContents( in TEST_P()
2346 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}"); in TEST_F()
2347 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2349 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
2360 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}"); in TEST_F()
2361 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2363 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
2375 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;"); in TEST_F()
2376 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2378 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
2386 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo {int a;}"); in TEST_F()
2387 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2389 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
2396 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;"); in TEST_F()
2397 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2399 EXPECT_FALSE(io_delegate_.GetWrittenContents(options.OutputFile(), &output_file_contents)); in TEST_F()
2479 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { @nullable ParcelableHolder ext; }"); in TEST_P()
2483 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
2488 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { const int BIT = 0x1 << 3; }"); in TEST_P()
2491 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
2496 io_delegate_.SetFileContents("Foo.aidl", "union Foo { const int BIT = 0x1 << 3; int n; }"); in TEST_P()
2499 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
2504 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
2511 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2514 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/IFoo.java", &code)); in TEST_F()
2520 io_delegate_.SetFileContents( in TEST_F()
2542 io_delegate_.SetFileContents("foo/bar/Data.aidl", in TEST_F()
2558 io_delegate_.SetFileContents("api.aidl", ""); in TEST_F()
2562 bool result = dump_api(options, io_delegate_); in TEST_F()
2565 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/IFoo.aidl", &actual)); in TEST_F()
2586 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Data.aidl", &actual)); in TEST_F()
2601 io_delegate_.SetFileContents( in TEST_F()
2612 bool result = dump_api(options, io_delegate_); in TEST_F()
2615 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/IFoo.aidl", &actual)); in TEST_F()
2629 io_delegate_.SetFileContents( in TEST_F()
2641 EXPECT_FALSE(dump_api(options, io_delegate_)); in TEST_F()
2646 io_delegate_.SetFileContents("foo/bar/IFoo.aidl", in TEST_F()
2656 EXPECT_TRUE(dump_api(options, io_delegate_)); in TEST_F()
2659 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/IFoo.aidl", &actual)); in TEST_F()
2670 io_delegate_.SetFileContents("foo/bar/Enum.aidl", in TEST_F()
2680 EXPECT_TRUE(dump_api(options, io_delegate_)); in TEST_F()
2683 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Enum.aidl", &actual)); in TEST_F()
2693 io_delegate_.SetFileContents("foo/bar/Enum.aidl", in TEST_F()
2698 io_delegate_.SetFileContents("foo/bar/Foo.aidl", in TEST_F()
2709 EXPECT_TRUE(dump_api(options, io_delegate_)); in TEST_F()
2712 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Foo.aidl", &actual)); in TEST_F()
2722 io_delegate_.SetFileContents("foo/bar/Foo.aidl", in TEST_F()
2730 EXPECT_TRUE(dump_api(options, io_delegate_)); in TEST_F()
2733 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Foo.aidl", &actual)); in TEST_F()
2741 io_delegate_.SetFileContents("IFoo.aidl", "interface IFoo; interface IFoo;\n"); in TEST_F()
2742 io_delegate_.SetFileContents("Bar.aidl", "enum Bar { CONST = IFoo.NONE }\n"); in TEST_F()
2747 EXPECT_FALSE(dump_api(options, io_delegate_)); in TEST_F()
2758 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
2762 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2765 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
2769 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2777 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar { String s; }"); in TEST_F()
2779 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2782 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2784 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2788 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2791 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2794 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2796 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2799 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2805 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
2809 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2815 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T, T>;"); in TEST_F()
2817 EXPECT_FALSE(compile_aidl(optionsForParcelable, io_delegate_)); in TEST_F()
2822 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar;"); in TEST_F()
2823 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2827 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2829 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T>;"); in TEST_F()
2831 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2833 io_delegate_.SetFileContents("p/Bar.aidl", "package p; parcelable Bar<T, V>;"); in TEST_F()
2834 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2835 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2838 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2840 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2844 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
2848 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2859 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
2866 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2869 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
2874 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2878 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
2883 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2903 io_delegate_.SetFileContents(options.InputFiles().at(0), in TEST_F()
2908 io_delegate_.SetFileContents(options.InputFiles().at(1), in TEST_F()
2913 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2919 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
2929 io_delegate_.SetFileContents(options.InputFiles().at(0), in TEST_F()
2934 io_delegate_.SetFileContents(options.InputFiles().at(1), in TEST_F()
2939 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2948 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
2957 io_delegate_.SetFileContents(options.InputFiles().at(0), in TEST_F()
2962 io_delegate_.SetFileContents(options.InputFiles().at(1), in TEST_F()
2967 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
2972 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
2982 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
2986 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
2996 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
3000 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
3009 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
3013 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
3017 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
3020 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
3027 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3029 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3032 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
3038 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3040 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3043 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
3048 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{}"); in TEST_F()
3049 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3052 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
3057 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{ void foo();}"); in TEST_F()
3058 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo();}"); in TEST_F()
3060 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
3067 io_delegate_.SetFileContents("old/p/Foo.aidl", foo_definition); in TEST_F()
3068 io_delegate_.SetFileContents("old/p/Enum.aidl", enum_definition); in TEST_F()
3069 io_delegate_.SetFileContents("new/p/Foo.aidl", foo_definition); in TEST_F()
3070 io_delegate_.SetFileContents("new/p/Enum.aidl", enum_definition); in TEST_F()
3072 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
3078 io_delegate_.SetFileContents("old/p/Foo.aidl", "package p; parcelable Foo{ other.Enum e; }"); in TEST_F()
3079 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3081 io_delegate_.SetFileContents("import/other/Enum.aidl", "package other; enum Enum { FOO }"); in TEST_F()
3083 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
3090 io_delegate_.SetFileContents("old/p/Foo.aidl", foo_definition); in TEST_F()
3091 io_delegate_.SetFileContents("old/p/Enum.aidl", enum_definition); in TEST_F()
3092 io_delegate_.SetFileContents("new/p/Foo.aidl", foo_definition); in TEST_F()
3093 io_delegate_.SetFileContents("new/p/Enum.aidl", enum_definition); in TEST_F()
3095 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
3105 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3110 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3115 io_delegate_.SetFileContents("new/p/IBar.aidl", in TEST_F()
3120 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3124 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3129 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3136 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3140 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3145 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3152 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3156 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3160 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3165 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3169 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
3174 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
3180 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3184 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
3190 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
3196 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3200 io_delegate_.SetFileContents("old/p/Union.aidl", in TEST_F()
3205 io_delegate_.SetFileContents("new/p/Union.aidl", in TEST_F()
3211 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3215 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3220 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3225 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3230 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3235 io_delegate_.SetFileContents("new/q/IFoo.aidl", in TEST_F()
3240 io_delegate_.SetFileContents("new/q/Data.aidl", in TEST_F()
3245 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3249 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3254 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3259 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3263 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
3266 io_delegate_.SetFileContents("new/p/I.aidl", in TEST_F()
3269 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3273 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
3276 io_delegate_.SetFileContents("new/p/I.aidl", in TEST_F()
3279 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3283 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
3288 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3293 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3297 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
3300 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3304 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3308 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3313 io_delegate_.SetFileContents( in TEST_F()
3320 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
3326 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3330 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3335 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
3341 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3346 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
3352 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3356 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3361 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3368 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3372 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3377 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3383 EXPECT_TRUE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3393 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3400 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3407 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3413 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3419 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3430 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3435 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3442 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3453 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3458 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3465 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3472 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3478 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3484 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3496 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3501 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3508 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3516 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3521 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3527 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
3534 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3541 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
3547 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
3553 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3560 io_delegate_.SetFileContents("old/p/Union.aidl", in TEST_F()
3566 io_delegate_.SetFileContents("new/p/Union.aidl", in TEST_F()
3572 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3579 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3585 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3592 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3598 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3604 io_delegate_.SetFileContents("new/p/IFoo2.aidl", in TEST_F()
3611 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3618 io_delegate_.SetFileContents("old/p/Enum.aidl", in TEST_F()
3624 io_delegate_.SetFileContents("new/p/Enum.aidl", in TEST_F()
3631 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3641 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3647 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3654 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3662 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3668 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3675 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3681 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3687 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3694 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3701 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3707 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3714 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3721 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
3727 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
3734 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3741 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
3746 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
3752 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3761 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
3765 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3771 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3778 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
3783 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3789 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3796 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
3801 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3807 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3813 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{}"); in TEST_F()
3814 io_delegate_.SetFileContents("old/q/IFoo.aidl", "package q; interface IFoo{}"); in TEST_F()
3815 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{}"); in TEST_F()
3817 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3823 io_delegate_.SetFileContents("old/p/D.aidl", "package p; parcelable D { int a = 1; }"); in TEST_F()
3824 io_delegate_.SetFileContents("new/p/D.aidl", "package p; parcelable D { int a = 2; }"); in TEST_F()
3826 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3833 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
3836 io_delegate_.SetFileContents("new/p/I.aidl", "package p; interface I { const int A = 1; }"); in TEST_F()
3838 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3845 io_delegate_.SetFileContents("old/p/I.aidl", "package p; interface I { const int A = 1; }"); in TEST_F()
3846 io_delegate_.SetFileContents("new/p/I.aidl", "package p; interface I { const int A = 2; }"); in TEST_F()
3848 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3856 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
3858 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3861 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3870 io_delegate_.SetFileContents("old/android/net/UidRangeParcel.aidl", in TEST_F()
3872 io_delegate_.SetFileContents( in TEST_F()
3876 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3883 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
3885 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3888 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3895 io_delegate_.SetFileContents("old/p/Foo.aidl", in TEST_F()
3902 io_delegate_.SetFileContents("new/p/Foo.aidl", in TEST_F()
3910 EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_)); in TEST_F()
3932 io_delegate_.SetFileContents("Foo.aidl", in TEST_P()
3945 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { int a; }"); in TEST_P()
3946 io_delegate_.SetFileContents("OtherFixed.aidl", "@FixedSize parcelable OtherFixed { int a; }"); in TEST_P()
3950 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
3972 io_delegate_.SetFileContents("Foo.aidl", in TEST_P()
3985 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { int a; }"); in TEST_P()
3986 io_delegate_.SetFileContents("OtherFixed.aidl", "@FixedSize parcelable OtherFixed { int a; }"); in TEST_P()
3990 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
3997 io_delegate_.SetFileContents("Foo.aidl", "@FixedSize parcelable Foo { int a; Bar b; }"); in TEST_P()
3998 io_delegate_.SetFileContents("Bar.aidl", "@FixedSize parcelable Bar { Val c; }"); in TEST_P()
3999 io_delegate_.SetFileContents("Val.aidl", "enum Val { A, B, }"); in TEST_P()
4003 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
4013 io_delegate_.SetFileContents("p/IFoo.aidl", "package p; import q.IBar; interface IFoo{}"); in TEST_F()
4014 io_delegate_.SetFileContents("dir1/q/IBar.aidl", "package q; interface IBar{}"); in TEST_F()
4015 io_delegate_.SetFileContents("dir2/q/IBar.aidl", "package q; interface IBar{}"); in TEST_F()
4018 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4027 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 10;}"); in TEST_F()
4028 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 10;}"); in TEST_F()
4030 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
4032 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 11;}"); in TEST_F()
4034 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
4043 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_P()
4045 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
4048 map<string, string> outputs = io_delegate_.OutputFiles(); in TEST_P()
4051 io_delegate_.SetFileContents( in TEST_P()
4054 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
4056 EXPECT_EQ(outputs, io_delegate_.OutputFiles()); in TEST_P()
4059 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_P()
4065 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
4067 EXPECT_EQ(outputs, io_delegate_.OutputFiles()); in TEST_P()
4073 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_P()
4078 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
4085 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_P()
4090 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
4097 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
4102 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4107 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
4112 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4119 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
4125 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4135 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
4141 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4149 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
4155 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4184 io_delegate_.SetFileContents("dir/IBar.aidl", "interface IBar{}"); in TEST_F()
4185 io_delegate_.SetFileContents("IFoo.aidl", "import IBar; interface IFoo{}"); in TEST_F()
4186 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4190 io_delegate_.SetFileContents("a/b/IFoo.aidl", in TEST_F()
4195 io_delegate_.SetFileContents("a/b/IBar.aidl", "package a.b; interface IBar { void foo(); }"); in TEST_F()
4196 io_delegate_.SetFileContents("a/b/IQux.aidl", "package a.b; interface IQux { void foo(); }"); in TEST_F()
4199 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4202 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/include/aidl/a/b/IFoo.h", &output)); in TEST_F()
4211 io_delegate_.SetFileContents("some/dir/pkg/name/IFoo.aidl", in TEST_F()
4217 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4222 io_delegate_.SetFileContents("a/IFoo.aidl", R"--(package a; in TEST_F()
4232 io_delegate_.SetFileContents("a/MyEnum.aidl", R"--(package a; in TEST_F()
4241 EXPECT_TRUE(compile_aidl(java_options, io_delegate_)); in TEST_F()
4244 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/IFoo.java", &java_out)); in TEST_F()
4254 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/MyEnum.java", &java_out)); in TEST_F()
4262 EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_)); in TEST_F()
4266 EXPECT_TRUE(compile_aidl(ndk_options, io_delegate_)); in TEST_F()
4269 EXPECT_TRUE(compile_aidl(rust_options, io_delegate_)); in TEST_F()
4273 io_delegate_.SetFileContents("a/Foo.aidl", R"(package a; in TEST_F()
4280 EXPECT_TRUE(compile_aidl(rust_options, io_delegate_)); in TEST_F()
4283 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.rs", &rust_out)); in TEST_F()
4288 EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_)); in TEST_F()
4291 EXPECT_TRUE(compile_aidl(ndk_options, io_delegate_)); in TEST_F()
4294 EXPECT_TRUE(compile_aidl(java_options, io_delegate_)); in TEST_F()
4312 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4320 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4325 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4332 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4336 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4343 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4347 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4354 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4358 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4367 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4373 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4382 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4388 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4397 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4403 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4412 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4418 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4427 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4433 io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a; in TEST_F()
4440 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4443 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/IFoo.java", &code)); in TEST_F()
4451 io_delegate_.SetFileContents("sub/dir/foo/bar/IFoo.aidl", "package foo.bar; interface IFoo {}"); in SetUp()
4455 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in Test()
4457 EXPECT_TRUE(io_delegate_.GetWrittenContents(expected_output_path, nullptr)); in Test()
4703 io_delegate_.SetFileContents("Foo.aidl", in TEST_F()
4706 io_delegate_.SetFileContents("Bar.aidl", "@JavaOnlyImmutable parcelable Bar { String a; }"); in TEST_F()
4707 io_delegate_.SetFileContents("Baz.aidl", in TEST_F()
4710 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4714 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { Bar bar; }"); in TEST_F()
4715 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { String a; }"); in TEST_F()
4721 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4726 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { Bar bar; }"); in TEST_F()
4727 io_delegate_.SetFileContents("Bar.aidl", "enum Bar { FOO }"); in TEST_F()
4730 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4735 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable union Foo { Bar bar; }"); in TEST_F()
4736 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar { String a; }"); in TEST_F()
4742 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4747 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { int a; }"); in TEST_F()
4748 io_delegate_.SetFileContents("IBar.aidl", "interface IBar { void my(inout Foo foo); }"); in TEST_F()
4754 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4759 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { int a; }"); in TEST_F()
4760 io_delegate_.SetFileContents("IBar.aidl", "interface IBar { void my(out Foo foo); }"); in TEST_F()
4766 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4771 io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { int a; int A; }"); in TEST_F()
4777 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4783 io_delegate_.SetFileContents("Bar.aidl", "union Bar { int n = 42; long l; }"); in TEST_P()
4808 io_delegate_.SetFileContents("a/Enum.aidl", "package a; enum Enum { FOO, BAR }"); in TEST_P()
4817 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T, U> { int a; int A; }"); in TEST_P()
4821 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
4826 io_delegate_.SetFileContents("Foo.aidl", in TEST_F()
4832 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4836 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/Foo.h", &code)); in TEST_F()
4845 io_delegate_.SetFileContents("Foo.aidl", in TEST_F()
4851 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4855 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/aidl/Foo.h", &code)); in TEST_F()
4862 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar<A> { }"); in TEST_F()
4863 io_delegate_.SetFileContents("a/Baz.aidl", "package a; parcelable Baz<A, B> { }"); in TEST_F()
4865 io_delegate_.SetFileContents("a/Foo.aidl", in TEST_F()
4871 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4875 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/a/Foo.java", &code)); in TEST_F()
4882 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { String[2][3] a; }"); in TEST_F()
4886 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4891 io_delegate_.SetFileContents( in TEST_F()
4896 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4901 io_delegate_.SetFileContents( in TEST_F()
4906 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
4911 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { String[2][] a; }"); in TEST_F()
4915 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4920 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { String[][3] a; }"); in TEST_F()
4924 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4929 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { String[][] a; }"); in TEST_F()
4933 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4938 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { String[-1] a; }"); in TEST_F()
4942 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4947 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { String[\"3\"] a; }"); in TEST_F()
4951 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4956 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
4963 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4968 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar { List[]<String> a; }"); in TEST_F()
4972 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4977 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
4982 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4987 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
4992 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
4998 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
5006 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
5011 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
5019 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5024 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
5032 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5038 io_delegate_.SetFileContents("a/Bar.aidl", in TEST_F()
5046 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5052 FakeIoDelegate io_delegate_; member
5054 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { Bar<Baz<Qux>> x; }"); in Compile()
5055 io_delegate_.SetFileContents("Bar.aidl", "parcelable Bar<T> { }"); in Compile()
5056 io_delegate_.SetFileContents("Baz.aidl", "parcelable Baz<T> { }"); in Compile()
5057 io_delegate_.SetFileContents("Qux.aidl", "parcelable Qux { }"); in Compile()
5061 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in Compile()
5069 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/Foo.h", &code)); in TEST_F()
5078 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/aidl/Foo.h", &code)); in TEST_F()
5085 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T,T> { int a; int A; }"); in TEST_P()
5090 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
5095 io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T,T> { T a; int A; }"); in TEST_P()
5101 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
5106 io_delegate_.SetFileContents("Foo.aidl", "enum Foo { FOO = (1 << 1) /* comment */ | 0x0 }"); in TEST_P()
5109 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
5114 io_delegate_.SetFileContents("a/Foo.aidl", "package a; union Foo { List l; Map m; }"); in TEST_F()
5126 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5131 io_delegate_.SetFileContents("a/Foo.aidl", "package a; parcelable Foo { List l; Map m; }"); in TEST_F()
5143 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5148 io_delegate_.SetFileContents("a/Bar.aidl", "package a; parcelable Bar<T>;"); in TEST_F()
5149 io_delegate_.SetFileContents( in TEST_F()
5162 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5167 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO, BAR }"); in TEST_F()
5168 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
5176 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
5181 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/p/Foo.java", &code)); in TEST_F()
5186 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO, BAR }"); in TEST_F()
5187 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
5195 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
5200 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/p/Foo.h", &code)); in TEST_F()
5205 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO, BAR }"); in TEST_F()
5206 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
5214 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
5219 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/aidl/p/Foo.h", &code)); in TEST_F()
5224 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO, BAR }"); in TEST_F()
5225 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
5234 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
5239 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/p/Foo.rs", &code)); in TEST_F()
5251 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO = 1, BAR = 2}"); in TEST_P()
5299 io_delegate_.SetFileContents("foo/bar/Foo.aidl", R"( in TEST_F()
5310 io_delegate_.SetFileContents("foo/bar/Bar.aidl", R"( in TEST_F()
5317 io_delegate_.SetFileContents("foo/bar/Enum.aidl", R"( in TEST_F()
5331 ASSERT_TRUE(dump_api(Options::From(args), io_delegate_)); in TEST_F()
5334 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Foo.aidl", &actual)); in TEST_F()
5344 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Bar.aidl", &actual)); in TEST_F()
5352 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Enum.aidl", &actual)); in TEST_F()
5363 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO = 1, BAR = 2}"); in TEST_F()
5364 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
5372 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5379 io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO = 1, BAR = 2}"); in TEST_F()
5380 io_delegate_.SetFileContents("a/p/Foo.aidl", R"( in TEST_F()
5388 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5393 io_delegate_.SetFileContents("a/p/Foo.aidl", "package p; parcelable Foo { p.Bar[] bars = {}; }"); in TEST_P()
5394 io_delegate_.SetFileContents("a/p/Bar.aidl", "package p; parcelable Bar { }"); in TEST_P()
5398 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
5404 io_delegate_.SetFileContents("a/p/IFoo.aidl", in TEST_P()
5412 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
5421 io_delegate_.SetFileContents( in TEST_F()
5424 io_delegate_.SetFileContents("a/p/Bar.aidl", "package p; enum Bar { FOO, BAR }"); in TEST_F()
5427 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
5431 EXPECT_TRUE(io_delegate_.GetWrittenContents("out/aidl/p/Foo.h", &code)); in TEST_F()
5438 io_delegate_.SetFileContents("a/p/Foo.aidl", "package p; enum Foo { A = B, B }"); in TEST_F()
5441 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5447 io_delegate_.SetFileContents("a/p/Foo.aidl", in TEST_F()
5451 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5457 io_delegate_.SetFileContents("a/p/Foo.aidl", in TEST_F()
5459 io_delegate_.SetFileContents("a/p/Bar.aidl", in TEST_F()
5461 io_delegate_.SetFileContents("a/p/Baz.aidl", "package p; parcelable Baz { const int A = 1; }"); in TEST_F()
5464 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_F()
5469 io_delegate_.SetFileContents("Foo.aidl", "enum Foo { A = Foo.A }"); in TEST_P()
5474 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
5479 io_delegate_.SetFileContents("Foo.aidl", "enum Foo { A = 0 }"); in TEST_P()
5481 io_delegate_.SetFileContents("Bar.aidl", "enum Bar { A = Foo.A, B = A, C = A }"); in TEST_P()
5485 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
5490 io_delegate_.SetFileContents("Foo.aidl", " parcelable Foo { int field = UNKNOWN_REF; }"); in TEST_P()
5497 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
5511 io_delegate_.SetFileContents("p/Foo.aidl", "package p; interface Foo {}"); in TEST_P()
5515 EXPECT_TRUE(compile_aidl(options, io_delegate_)); in TEST_P()
5522 io_delegate_.SetFileContents("p/Foo.aidl", "package p; interface Foo {}"); in TEST_P()
5526 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_P()
5535 io_delegate_.SetFileContents(input_file, "package p.q; interface IFoo {}"); in TEST_F()
5539 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5581 io_delegate_.SetFileContents( in TEST_F()
5588 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5593 io_delegate_.SetFileContents("p/IFoo.aidl", "package p; interface IFoo{ void j(void n);}"); in TEST_F()
5596 EXPECT_FALSE(compile_aidl(options, io_delegate_)); in TEST_F()
5601 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
5610 io_delegate_)); in TEST_F()
5618 io_delegate_)); in TEST_F()