aboutsummaryrefslogtreecommitdiff
path: root/tests/test_required_types.py
diff options
context:
space:
mode:
authorMarco Poletti <poletti.marco@gmail.com>2017-07-15 22:06:53 +0100
committerMarco Poletti <poletti.marco@gmail.com>2017-07-15 22:06:53 +0100
commit508af7c890bfedd77f7400e416dbe06301de79f5 (patch)
treedc6e1c445634f8d209899658fa9071bcac29ee41 /tests/test_required_types.py
parenteac550967392f0fb8b4af342d0c4a2b6a54c447b (diff)
downloadgoogle-fruit-508af7c890bfedd77f7400e416dbe06301de79f5.tar.gz
Remove Component's copy constructor, conversion operator and install method.
Diffstat (limited to 'tests/test_required_types.py')
-rwxr-xr-xtests/test_required_types.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/tests/test_required_types.py b/tests/test_required_types.py
index 8ca8a60..c2b4331 100755
--- a/tests/test_required_types.py
+++ b/tests/test_required_types.py
@@ -65,47 +65,6 @@ def test_required_success():
'''
expect_success(COMMON_DEFINITIONS, source)
-def test_required_success_old_style_install():
- source = '''
- struct X {
- virtual void foo() = 0;
- };
- using XFactory = std::function<std::unique_ptr<X>()>;
- struct Y {
- XFactory xFactory;
-
- INJECT(Y(XFactory xFactory))
- : xFactory(xFactory) {
- }
-
- void doStuff() {
- xFactory()->foo();
- }
- };
- fruit::Component<fruit::Required<XFactory>, Y> getYComponent() {
- return fruit::createComponent();
- }
- struct XImpl : public X {
- INJECT(XImpl()) = default;
- void foo() override {}
- };
- fruit::Component<XFactory> getXFactoryComponent() {
- return fruit::createComponent()
- .bind<X, XImpl>();
- }
- fruit::Component<Y> getComponent() {
- return fruit::createComponent()
- .install(getYComponent())
- .install(getXFactoryComponent());
- }
- int main() {
- fruit::Injector<Y> injector(getComponent());
- Y* y(injector);
- y->doStuff();
- }
- '''
- expect_success(COMMON_DEFINITIONS, source, ignore_deprecation_warnings=True)
-
def test_required_annotated_success():
source = '''
struct X {