Lines Matching refs:io_delegate_
136 io_delegate_.SetFileContents(path, contents);
156 ImportResolver import_resolver{io_delegate_, path, import_paths_, {}};
158 path, options, io_delegate_, types, &defined_types, &imported_files);
173 FakeIoDelegate io_delegate_; member in android::aidl::AidlTest
187 io_delegate_.SetFileContents("bar/IBar.aidl", in TEST_F()
270 io_delegate_.SetFileContents("path", simple_content); in TEST_F()
272 EXPECT_TRUE(parse_preprocessed_file(io_delegate_, "path", &java_types_, java_types_.typenames_)); in TEST_F()
279 io_delegate_.SetFileContents("path", simple_content); in TEST_F()
281 EXPECT_TRUE(parse_preprocessed_file(io_delegate_, "path", &java_types_, java_types_.typenames_)); in TEST_F()
287 io_delegate_.SetFileContents("preprocessed", "interface another.IBar;"); in TEST_F()
288 io_delegate_.SetFileContents("one/IBar.aidl", "package one; " in TEST_F()
307 io_delegate_.SetFileContents("p/Outer.aidl", in TEST_F()
309 io_delegate_.SetFileContents("one/IBar.aidl", "package one; import p.Outer;" in TEST_F()
319 EXPECT_TRUE(::android::aidl::preprocess_aidl(options, io_delegate_)); in TEST_F()
322 EXPECT_TRUE(io_delegate_.GetWrittenContents("preprocessed", &output)); in TEST_F()
327 io_delegate_.SetFileContents("Rect.aidl", in TEST_F()
340 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
343 EXPECT_TRUE(io_delegate_.GetWrittenContents("Rect.java", &output)); in TEST_F()
348 io_delegate_.SetFileContents("p/Outer.aidl", in TEST_F()
359 io_delegate_.SetFileContents("preprocessed", in TEST_F()
373 io_delegate_.SetFileContents("p/IFoo.aidl", "package p; parcelable IFoo;"); in TEST_F()
377 EXPECT_EQ(0, ::android::aidl::compile_aidl(options1, io_delegate_)); in TEST_F()
381 EXPECT_NE(0, ::android::aidl::compile_aidl(options2, io_delegate_)); in TEST_F()
383 io_delegate_.SetFileContents("p/IBar.aidl", "package p; parcelable Foo; interface IBar{}"); in TEST_F()
387 EXPECT_EQ(0, ::android::aidl::compile_aidl(options3, io_delegate_)); in TEST_F()
389 EXPECT_NE(0, ::android::aidl::compile_aidl(options4, io_delegate_)); in TEST_F()
393 io_delegate_.SetFileContents("o/WhoKnowsWhat.aidl", "package o; parcelable WhoKnowsWhat;"); in TEST_F()
496 io_delegate_.SetFileContents( in TEST_F()
513 io_delegate_.SetFileContents( in TEST_F()
549 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}"); in TEST_F()
550 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
552 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
567 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}"); in TEST_F()
568 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
570 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
586 io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;"); in TEST_F()
587 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
589 EXPECT_TRUE(io_delegate_.GetWrittenContents(options.DependencyFile(), &actual_dep_file_contents)); in TEST_F()
607 io_delegate_.SetFileContents( in TEST_F()
620 io_delegate_.SetFileContents("foo/bar/Data.aidl", in TEST_F()
631 io_delegate_.SetFileContents("api.aidl", ""); in TEST_F()
635 bool result = dump_api(options, io_delegate_); in TEST_F()
638 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/IFoo.aidl", &actual)); in TEST_F()
650 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Data.aidl", &actual)); in TEST_F()
664 io_delegate_.SetFileContents( in TEST_F()
675 bool result = dump_api(options, io_delegate_); in TEST_F()
678 EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/IFoo.aidl", &actual)); in TEST_F()
689 io_delegate_.SetFileContents( in TEST_F()
700 EXPECT_FALSE(dump_api(options, io_delegate_)); in TEST_F()
705 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
708 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
710 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
713 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
716 io_delegate_.SetFileContents(options2.InputFiles().front(), in TEST_F()
719 EXPECT_NE(0, ::android::aidl::compile_aidl(options2, io_delegate_)); in TEST_F()
721 io_delegate_.SetFileContents(options2.InputFiles().front(), in TEST_F()
724 EXPECT_NE(0, ::android::aidl::compile_aidl(options2, io_delegate_)); in TEST_F()
729 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
735 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
741 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
748 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
754 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
763 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
772 io_delegate_.SetFileContents(options.InputFiles().at(0), in TEST_F()
777 io_delegate_.SetFileContents(options.InputFiles().at(1), in TEST_F()
782 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
788 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
797 io_delegate_.SetFileContents(options.InputFiles().at(0), in TEST_F()
802 io_delegate_.SetFileContents(options.InputFiles().at(1), in TEST_F()
807 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
816 EXPECT_TRUE(io_delegate_.GetWrittenContents(file, &content)); in TEST_F()
824 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
827 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
831 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
834 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
837 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
840 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
843 io_delegate_.SetFileContents(options.InputFiles().front(), in TEST_F()
846 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
851 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
853 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
856 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
861 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{ void foo();}"); in TEST_F()
862 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo();}"); in TEST_F()
864 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
869 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
874 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
881 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
886 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
891 io_delegate_.SetFileContents("new/p/IBar.aidl", in TEST_F()
896 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
897 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
898 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
899 io_delegate_.SetFileContents("new/p/IBar.aidl", ""); in TEST_F()
902 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
908 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
913 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
914 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
915 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
918 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
923 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
929 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
930 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
931 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
934 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
939 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
944 io_delegate_.SetFileContents("new/q/IFoo.aidl", in TEST_F()
949 io_delegate_.SetFileContents("new/q/Data.aidl", in TEST_F()
954 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
955 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
956 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
957 io_delegate_.SetFileContents("new/q/IFoo.aidl", ""); in TEST_F()
958 io_delegate_.SetFileContents("new/q/Data.aidl", ""); in TEST_F()
961 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
966 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
971 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
972 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
973 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
975 io_delegate_.SetFileContents("old/p/IFoo.aidl", ""); in TEST_F()
976 io_delegate_.SetFileContents("old/p/Data.aidl", ""); in TEST_F()
979 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
982 io_delegate_.SetFileContents("new/p/I.aidl", in TEST_F()
985 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
986 io_delegate_.SetFileContents("old/p/I.aidl", ""); in TEST_F()
987 io_delegate_.SetFileContents("new/p/I.aidl", ""); in TEST_F()
990 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
993 io_delegate_.SetFileContents("new/p/I.aidl", in TEST_F()
996 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1001 io_delegate_.SetFileContents("old/p/IFoo.aidl", in TEST_F()
1007 io_delegate_.SetFileContents("old/p/Data.aidl", in TEST_F()
1015 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1021 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1022 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1025 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1030 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1036 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1037 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1038 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1041 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1047 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1052 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1053 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1054 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1057 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1063 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1069 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1070 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1071 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1074 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1080 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1086 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1087 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1088 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1091 io_delegate_.SetFileContents("new/p/IFoo2.aidl", in TEST_F()
1097 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1103 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1104 io_delegate_.SetFileContents("new/p/IFoo2.aidl", ""); in TEST_F()
1105 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1108 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1114 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1120 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1121 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1122 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1125 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1131 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1137 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1138 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1139 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1142 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1148 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1154 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1155 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1156 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1159 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1165 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1171 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1172 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1173 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1176 io_delegate_.SetFileContents("new/p/IFoo.aidl", in TEST_F()
1182 io_delegate_.SetFileContents("new/p/Data.aidl", in TEST_F()
1188 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1189 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1190 io_delegate_.SetFileContents("new/p/Data.aidl", ""); in TEST_F()
1193 io_delegate_.SetFileContents("old/p/Data.aidl", ""); in TEST_F()
1194 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{}"); in TEST_F()
1195 io_delegate_.SetFileContents("old/q/IFoo.aidl", "package q; interface IFoo{}"); in TEST_F()
1197 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{}"); in TEST_F()
1198 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1199 io_delegate_.SetFileContents("old/p/IFoo.aidl", ""); in TEST_F()
1200 io_delegate_.SetFileContents("old/q/IFoo.aidl", ""); in TEST_F()
1201 io_delegate_.SetFileContents("new/p/IFoo.aidl", ""); in TEST_F()
1204 io_delegate_.SetFileContents("old/p/D.aidl", "package p; parcelable D { int a = 1; }"); in TEST_F()
1205 io_delegate_.SetFileContents("new/p/D.aidl", "package p; parcelable D { int a = 2; }"); in TEST_F()
1206 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1207 io_delegate_.SetFileContents("old/p/D.aidl", ""); in TEST_F()
1208 io_delegate_.SetFileContents("new/p/D.aidl", ""); in TEST_F()
1211 io_delegate_.SetFileContents("old/p/I.aidl", in TEST_F()
1214 io_delegate_.SetFileContents("new/p/I.aidl", "package p; interface I { const int A = 1; }"); in TEST_F()
1215 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1216 io_delegate_.SetFileContents("old/p/I.aidl", ""); in TEST_F()
1217 io_delegate_.SetFileContents("new/p/I.aidl", ""); in TEST_F()
1220 io_delegate_.SetFileContents("old/p/I.aidl", "package p; interface I { const int A = 1; }"); in TEST_F()
1221 io_delegate_.SetFileContents("new/p/I.aidl", "package p; interface I { const int A = 2; }"); in TEST_F()
1222 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1223 io_delegate_.SetFileContents("old/p/I.aidl", ""); in TEST_F()
1224 io_delegate_.SetFileContents("new/p/I.aidl", ""); in TEST_F()
1229 io_delegate_.SetFileContents("p/IFoo.aidl", "package p; import q.IBar; interface IFoo{}"); in TEST_F()
1230 io_delegate_.SetFileContents("dir1/q/IBar.aidl", "package q; interface IBar{}"); in TEST_F()
1231 io_delegate_.SetFileContents("dir2/q/IBar.aidl", "package q; interface IBar{}"); in TEST_F()
1233 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1238 io_delegate_.SetFileContents("old/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 10;}"); in TEST_F()
1239 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 10;}"); in TEST_F()
1241 EXPECT_TRUE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1243 io_delegate_.SetFileContents("new/p/IFoo.aidl", "package p; interface IFoo{ void foo() = 11;}"); in TEST_F()
1244 EXPECT_FALSE(::android::aidl::check_api(options, io_delegate_)); in TEST_F()
1252 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1254 EXPECT_EQ(0, ::android::aidl::compile_aidl(javaOptions, io_delegate_)); in TEST_F()
1255 EXPECT_EQ(0, ::android::aidl::compile_aidl(cppOptions, io_delegate_)); in TEST_F()
1258 io_delegate_.SetFileContents( in TEST_F()
1261 EXPECT_EQ(0, ::android::aidl::compile_aidl(javaOptions, io_delegate_)); in TEST_F()
1262 EXPECT_EQ(0, ::android::aidl::compile_aidl(cppOptions, io_delegate_)); in TEST_F()
1265 io_delegate_.SetFileContents("p/IFoo.aidl", in TEST_F()
1271 EXPECT_EQ(0, ::android::aidl::compile_aidl(javaOptions, io_delegate_)); in TEST_F()
1272 EXPECT_EQ(0, ::android::aidl::compile_aidl(cppOptions, io_delegate_)); in TEST_F()
1277 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
1282 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1287 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
1292 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1297 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
1302 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1308 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
1313 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1318 io_delegate_.SetFileContents("IFoo.aidl", in TEST_F()
1323 EXPECT_NE(0, ::android::aidl::compile_aidl(options, io_delegate_)); in TEST_F()
1330 io_delegate_.SetFileContents("sub/dir/foo/bar/IFoo.aidl", "package foo.bar; interface IFoo {}"); in SetUp()
1334 EXPECT_EQ(0, ::android::aidl::compile_aidl(options, io_delegate_)); in Test()
1336 EXPECT_TRUE(io_delegate_.GetWrittenContents(expected_output_path, nullptr)); in Test()