Lines Matching defs:pool
531 DescriptorPool pool;
532 const FileDescriptor* file = pool.BuildFile(proto);
542 DescriptorPool pool;
543 const FileDescriptor* file = pool.BuildFile(proto);
590 DescriptorPool pool;
605 const FileDescriptor* descriptor = pool.BuildFile(proto);
2034 DescriptorPool pool;
2038 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
2050 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
2064 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
2566 DescriptorPool pool;
2567 const FileDescriptor* file = pool.BuildFile(file_proto);
2646 DescriptorPool pool;
2647 const FileDescriptor* file = pool.BuildFile(file_proto);
2923 // dependency that finds it. In the event that the pool is backed by a
2924 // DescriptorDatabase, the pool will attempt to find the symbol in the
2946 // it into the descriptor pool in the fallback database case: it just needs to
3145 DescriptorPool pool;
3149 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3153 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3188 const FileDescriptor* file = pool.BuildFile(file_proto);
3203 DescriptorPool pool;
3207 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3211 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3266 const FileDescriptor* file = pool.BuildFile(file_proto);
3280 DescriptorPool pool;
3284 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3288 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3343 const FileDescriptor* file = pool.BuildFile(file_proto);
3360 DescriptorPool pool;
3364 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3368 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3423 const FileDescriptor* file = pool.BuildFile(file_proto);
3482 DescriptorPool pool;
3486 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3490 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3492 pool.AddUnusedImportTrackFile("custom_options_import.proto", true);
3500 EXPECT_FALSE(pool.BuildFileCollectingErrors(file_proto, &error_collector));
3512 DescriptorPool pool;
3516 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3555 // Adding the file descriptor to the pool should fail.
3556 EXPECT_TRUE(pool.BuildFile(file_proto) == nullptr);
3561 DescriptorPool pool;
3565 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
3602 // generated pool with custom descriptor pools when dealing with
3616 const FileDescriptor* descriptor = pool.BuildFile(file_proto);
3677 // Builds some already-parsed file in our test pool.
3684 // Build descriptor.proto in our test pool. This allows us to extend it in
3685 // the test pool, so we can test custom options.
3902 "pool.\n");
6509 // Now try to refer to it. (All tests in the fixture use the same pool, so we
6526 DescriptorPool pool;
6530 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
6543 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr);
6753 DescriptorPool pool(&database_);
6755 const FileDescriptor* foo = pool.FindFileByName("foo.proto");
6761 EXPECT_EQ(foo, pool.FindFileByName("foo.proto"));
6763 EXPECT_TRUE(pool.FindFileByName("no_such_file.proto") == nullptr);
6767 DescriptorPool pool(&database_);
6769 const FileDescriptor* foo = pool.FindFileByName("foo.proto");
6775 const FileDescriptor* bar = pool.FindFileByName("bar.proto");
6786 DescriptorPool pool(&database_);
6788 const FileDescriptor* bar = pool.FindFileByName("bar.proto");
6794 const FileDescriptor* foo = pool.FindFileByName("foo.proto");
6805 DescriptorPool pool(&database_);
6807 const FileDescriptor* file = pool.FindFileContainingSymbol("Foo");
6810 EXPECT_EQ(file, pool.FindFileByName("foo.proto"));
6812 EXPECT_TRUE(pool.FindFileContainingSymbol("NoSuchSymbol") == nullptr);
6816 DescriptorPool pool(&database_);
6818 const Descriptor* type = pool.FindMessageTypeByName("Foo");
6821 EXPECT_EQ(type->file(), pool.FindFileByName("foo.proto"));
6823 EXPECT_TRUE(pool.FindMessageTypeByName("NoSuchType") == nullptr);
6827 DescriptorPool pool(&database_);
6829 const Descriptor* foo = pool.FindMessageTypeByName("Foo");
6832 const FieldDescriptor* extension = pool.FindExtensionByNumber(foo, 5);
6835 EXPECT_EQ(extension->file(), pool.FindFileByName("bar.proto"));
6837 EXPECT_TRUE(pool.FindExtensionByNumber(foo, 12) == nullptr);
6841 DescriptorPool pool(&database_);
6843 const Descriptor* foo = pool.FindMessageTypeByName("Foo");
6847 // results despite the fallback database lookup mutating the pool.
6849 pool.FindAllExtensions(foo, &extensions);
6857 DescriptorPool pool(&error_database);
6863 EXPECT_TRUE(pool.FindFileByName("error.proto") == nullptr);
6873 DescriptorPool pool(&error_database, &error_collector);
6875 EXPECT_TRUE(pool.FindFileByName("error.proto") == nullptr);
6890 DescriptorPool pool(&database_, &error_collector);
6891 EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == nullptr);
6900 // Make sure that all traces of bad types are removed from the pool. This used
6906 DescriptorPool pool(&database_);
6907 EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == nullptr);
6909 EXPECT_TRUE(pool.FindFileByName("baz.proto") == nullptr);
6910 EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == nullptr);
6921 DescriptorPool pool(&database);
6923 pool.FindFileByName(original_file->name());
6945 DescriptorPool pool(&call_counter);
6947 const FileDescriptor* file = pool.FindFileByName("foo.proto");
6949 const Descriptor* foo = pool.FindMessageTypeByName("Foo");
6951 const EnumDescriptor* test_enum = pool.FindEnumTypeByName("TestEnum");
6953 const ServiceDescriptor* test_service = pool.FindServiceByName("TestService");
6973 EXPECT_TRUE(pool.FindFileContainingSymbol("Foo.no.such.field") == nullptr);
6974 EXPECT_TRUE(pool.FindFileContainingSymbol("Foo.no_such_field") == nullptr);
6975 EXPECT_TRUE(pool.FindMessageTypeByName("Foo.NoSuchMessageType") == nullptr);
6976 EXPECT_TRUE(pool.FindFieldByName("Foo.no_such_field") == nullptr);
6977 EXPECT_TRUE(pool.FindExtensionByName("Foo.no_such_extension") == nullptr);
6978 EXPECT_TRUE(pool.FindEnumTypeByName("Foo.NoSuchEnumType") == nullptr);
6979 EXPECT_TRUE(pool.FindEnumValueByName("Foo.NO_SUCH_VALUE") == nullptr);
6980 EXPECT_TRUE(pool.FindMethodByName("TestService.NoSuchMethod") == nullptr);
6991 DescriptorPool pool(&false_positive_database, &error_collector);
6994 const Descriptor* foo = pool.FindMessageTypeByName("Foo");
6998 EXPECT_TRUE(pool.FindMessageTypeByName("NoSuchSymbol") == nullptr);
6999 EXPECT_TRUE(pool.FindExtensionByNumber(foo, 22) == nullptr);
7084 DescriptorPool pool(&error_database);
7088 EXPECT_TRUE(pool.FindFileByName("file40.proto") == nullptr);
7089 EXPECT_TRUE(pool.FindMessageTypeByName("Message40") == nullptr);
7097 DescriptorPool pool(&call_counter);
7099 const FileDescriptor* file = pool.FindFileByName("foo.proto");
7101 const Descriptor* foo = pool.FindMessageTypeByName("Foo");
7103 const EnumDescriptor* test_enum = pool.FindEnumTypeByName("TestEnum");
7109 EXPECT_TRUE(pool.FindMessageTypeByName("TestEnum") == nullptr);
7110 EXPECT_TRUE(pool.FindFieldByName("Foo") == nullptr);
7111 EXPECT_TRUE(pool.FindExtensionByName("Foo") == nullptr);
7112 EXPECT_TRUE(pool.FindEnumTypeByName("Foo") == nullptr);
7113 EXPECT_TRUE(pool.FindEnumValueByName("Foo") == nullptr);
7114 EXPECT_TRUE(pool.FindServiceByName("Foo") == nullptr);
7115 EXPECT_TRUE(pool.FindMethodByName("Foo") == nullptr);
7242 // we need descriptor.proto to be accessible by the pool
8058 // generated pool, and do custom options testing with generated to
8071 // lazily_build_dependencies_ is set on the generated pool, and also that