HomeSort by relevance Sort by last modified time
    Searched refs:XAnnot (Results 1 - 17 of 17) sorted by null

  /external/google-fruit/tests/
test_normalized_component.py 31 @pytest.mark.parametrize('XAnnot,X_ANNOT,YAnnot', [
35 def test_success_normalized_component_provides_unused(XAnnot, X_ANNOT, YAnnot):
43 fruit::Component<fruit::Required<XAnnot>, YAnnot> getComponent() {
47 fruit::Component<XAnnot> getXComponent(X* x) {
49 .bindInstance<XAnnot, X>(*x);
53 fruit::NormalizedComponent<fruit::Required<XAnnot>, YAnnot> normalizedComponent(getComponent);
57 fruit::Injector<XAnnot> injector(normalizedComponent, getXComponent, &x);
58 injector.get<XAnnot>();
66 @pytest.mark.parametrize('XAnnot,X_ANNOT,YAnnot', [
70 def test_success(XAnnot, X_ANNOT, YAnnot)
    [all...]
test_bind_interface.py 26 @pytest.mark.parametrize('XAnnot,MaybeConstXAnnot,XConstRefAnnot,YAnnot', [
38 def test_bind_interface(XAnnot, MaybeConstXAnnot, XConstRefAnnot, YAnnot):
53 .bind<XAnnot, YAnnot>();
67 @pytest.mark.parametrize('XAnnot,ConstXAnnot,XConstRefAnnot,YAnnot', [
74 def test_bind_interface_to_constant(XAnnot, ConstXAnnot, XConstRefAnnot, YAnnot):
90 .bind<XAnnot, YAnnot>();
104 @pytest.mark.parametrize('XAnnot,XRefAnnot,YAnnot', [
108 def test_bind_interface_target_bound_in_other_component(XAnnot, XRefAnnot, YAnnot):
119 fruit::Component<fruit::Required<YAnnot>, XAnnot> getComponent() {
121 .bind<XAnnot, YAnnot>()
    [all...]
test_component.py 31 @pytest.mark.parametrize('XAnnot', [
35 def test_move(XAnnot):
41 fruit::Component<XAnnot> getComponent() {
42 fruit::Component<XAnnot> c = fruit::createComponent();
43 fruit::Component<XAnnot> c2 = std::move(c);
44 return fruit::Component<XAnnot>(std::move(c2));
48 fruit::Injector<XAnnot> injector(getComponent);
49 injector.get<XAnnot>();
57 @pytest.mark.parametrize('XAnnot', [
61 def test_move_partial_component(XAnnot)
    [all...]
test_injector_unsafe_get.py 27 @pytest.mark.parametrize('XAnnot,YAnnot,ZAnnot', [
31 def test_success(XAnnot, YAnnot, ZAnnot):
46 fruit::Component<XAnnot> getComponent() {
57 const X* x = fruit::impl::InjectorAccessorForTests::unsafeGet<XAnnot>(injector);
test_binding_compression.py 35 @pytest.mark.parametrize('IAnnot,XAnnot,WithAnnot', [
39 def test_provider_returning_value_success_with_annotation(IAnnot, XAnnot, WithAnnot):
50 .registerProvider<XAnnot()>([](){return X();})
51 .bind<IAnnot, XAnnot>();
73 @pytest.mark.parametrize('IAnnot,XAnnot,XPtrAnnot,WithAnnot', [
77 def test_provider_returning_pointer_success_with_annotation(IAnnot, XAnnot, XPtrAnnot, WithAnnot):
89 .bind<IAnnot, XAnnot>();
test_injector.py 45 @pytest.mark.parametrize('XAnnot', [
49 def test_error_component_with_requirements(XAnnot):
53 fruit::Component<fruit::Required<XAnnot>> getComponent();
55 void f(fruit::NormalizedComponent<XAnnot> normalizedComponent) {
56 fruit::Injector<XAnnot> injector(normalizedComponent, getComponent);
60 'ComponentWithRequirementsInInjectorError<XAnnot>',
66 @pytest.mark.parametrize('XAnnot', [
70 def test_error_declared_types_not_provided(XAnnot):
82 fruit::Injector<XAnnot> injector(normalizedComponent, getEmptyComponent);
86 'TypesInInjectorNotProvidedError<XAnnot>',
    [all...]
test_multibindings_bind_instance.py 25 @pytest.mark.parametrize('XAnnot', [
29 def test_multibindings_bind_instance_ok(XAnnot):
37 .addInstanceMultibinding<XAnnot, X>(x);
43 std::vector<X*> multibindings = injector.getMultibindings<XAnnot>();
53 @pytest.mark.parametrize('XAnnot', [
57 def test_multibindings_bind_const_instance_error(XAnnot):
65 .addInstanceMultibinding<XAnnot, X>(x);
70 '|no matching function for call to .fruit::PartialComponent<.*>::addInstanceMultibinding(<XAnnot,X>)?\(const X&\).'
77 @pytest.mark.parametrize('XAnnot', [
81 def test_multibindings_bind_instance_vector(XAnnot)
    [all...]
test_component_and_injector_params.py 34 @pytest.mark.parametrize('XAnnot,MaybeConstXAnnot', [
45 def test_duplicate_type(XAnnot, MaybeConstXAnnot, Class):
50 'RepeatedTypesError<XAnnot,XAnnot>',
56 @pytest.mark.parametrize('XAnnot,ConstXAnnot', [
65 def test_duplicate_type_different_constness(XAnnot, ConstXAnnot, Class):
67 InstantiateType(fruit::Class<XAnnot, ConstXAnnot>)
70 'RepeatedTypesError<XAnnot,XAnnot>',
99 @pytest.mark.parametrize('XAnnot,MaybeConstXAnnot',
    [all...]
test_dependency_loop.py 34 @pytest.mark.parametrize('XAnnot,XConstRefAnnot,YAnnot,YConstRefAnnot', [
39 def test_loop_in_autoinject(XAnnot, XConstRefAnnot, YAnnot, YConstRefAnnot):
51 fruit::Component<XAnnot> mutuallyConstructibleComponent() {
56 'SelfLoopError<XAnnot,YAnnot>',
62 @pytest.mark.parametrize('XAnnot,ConstXAnnot,XConstRefAnnot,YAnnot,YConstRefAnnot', [
67 def test_loop_in_autoinject_const(XAnnot, ConstXAnnot, XConstRefAnnot, YAnnot, YConstRefAnnot):
84 'SelfLoopError<XAnnot,YAnnot>',
test_multibindings_bind_interface.py 29 @pytest.mark.parametrize('XAnnot,XImplAnnot', [
35 def test_add_interface_multibinding_success(XAnnot, XImplAnnot):
51 .addMultibinding<XAnnot, XImplAnnot>();
57 std::vector<X*> multibindings = injector.getMultibindings<XAnnot>();
67 @pytest.mark.parametrize('XAnnot,XImplAnnot,ConstXImplAnnot', [
71 def test_add_interface_multibinding_const_target_error_install_first(XAnnot, XImplAnnot, ConstXImplAnnot):
88 .addMultibinding<XAnnot, XImplAnnot>();
98 @pytest.mark.parametrize('XAnnot,XImplAnnot,ConstXImplAnnot', [
102 def test_add_interface_multibinding_const_target_error_binding_first(XAnnot, XImplAnnot, ConstXImplAnnot):
118 .addMultibinding<XAnnot, XImplAnnot>(
    [all...]
test_multibindings_bind_provider.py 395 @pytest.mark.parametrize('ConstructX,XAnnot,XPtrAnnot', [
401 def test_bind_multibinding_provider_explicit_signature_success(ConstructX, XAnnot, XPtrAnnot):
418 Assert(injector.getMultibindings<XAnnot>().size() == 1);
427 @pytest.mark.parametrize('ConstructX,XAnnot,XPtrAnnot', [
433 def test_bind_multibinding_provider_explicit_signature_with_normalized_component_success(ConstructX, XAnnot, XPtrAnnot):
455 Assert(injector.getMultibindings<XAnnot>().size() == 1);
464 @pytest.mark.parametrize('XAnnot,XPtrAnnot,intAnnot', [
468 def test_multiple_providers(XAnnot, XPtrAnnot, intAnnot):
475 .addMultibindingProvider<XAnnot(intAnnot)>([](int){return X();})
482 std::vector<X*> multibindings = injector.getMultibindings<XAnnot>();
    [all...]
test_binding_clash.py 47 '.registerConstructor<XAnnot()>()')
53 .bind<XAnnot, YAnnot>()
61 .bind<XAnnot, Y2Annot>()
66 fruit::Component<XAnnot> getParentComponent() {
68 .registerConstructor<XAnnot()>();
74 fruit::Component<XAnnot> getParentComponent2() {
76 .registerConstructor<XAnnot()>();
82 fruit::Component<const XAnnot> getParentComponent() {
84 .registerConstructor<XAnnot()>();
90 fruit::Component<const XAnnot> getParentComponent2()
    [all...]
test_register_instance.py 128 @pytest.mark.parametrize('XAnnot,MaybeConstXAnnot,XPtr,XPtrAnnot', [
134 def test_bind_instance_two_explicit_type_arguments_success(XAnnot, MaybeConstXAnnot, XPtr, XPtrAnnot):
146 .bindInstance<XAnnot, X>(*x);
158 @pytest.mark.parametrize('XAnnot', [
162 def test_bind_instance_abstract_class_ok(XAnnot):
170 .bindInstance<XAnnot, X>(*x);
173 fruit::Component<XAnnot> getComponentForInstance(X* x) {
176 .bindInstance<XAnnot, X>(*x);
401 @pytest.mark.parametrize('XAnnot', [
405 def test_bind_instance_mismatched_type_arguments(XAnnot)
    [all...]
test_register_provider.py 180 @pytest.mark.parametrize('XAnnot', [
184 def test_register_provider_error_not_function(XAnnot):
190 fruit::Component<XAnnot> getComponent() {
193 .registerProvider<XAnnot()>([=]{return X(n);});
221 @pytest.mark.parametrize('XAnnot,XPtrAnnot,XAnnotRegex', [
225 def test_register_provider_error_returned_nullptr(XAnnot, XPtrAnnot, XAnnotRegex):
229 fruit::Component<XAnnot> getComponent() {
235 fruit::Injector<XAnnot> injector(getComponent);
236 injector.get<XAnnot>();
test_install.py 212 @pytest.mark.parametrize('XAnnot,ConstXAnnot', [
216 def test_install_requiring_nonconst_then_install_requiring_const_ok(XAnnot, ConstXAnnot):
222 fruit::Component<fruit::Required<XAnnot>, Y> getChildComponent1() {
236 .registerConstructor<XAnnot()>();
795 @pytest.mark.parametrize('XAnnot', [
799 def test_install_component_functions_deduped(XAnnot):
807 .addInstanceMultibinding<XAnnot, X>(x);
831 std::vector<X*> multibindings = injector.getMultibindings<XAnnot>();
841 @pytest.mark.parametrize('XAnnot', [
845 def test_install_component_functions_deduped_across_normalized_component(XAnnot)
    [all...]
test_register_constructor.py 25 using XAnnot = fruit::Annotated<Annotation1, X>;
102 @pytest.mark.parametrize('XAnnot,YAnnot,MaybeConstYAnnot,ZAnnot', [
107 def test_autoinject_with_annotation_success(XAnnot, YAnnot, MaybeConstYAnnot, ZAnnot):
121 fruit::Component<ZAnnot, MaybeConstYAnnot, XAnnot> getComponent() {
146 using Inject = XAnnot();
149 fruit::Component<XAnnot> getComponent() {
test_register_factory.py     [all...]

Completed in 189 milliseconds