From 80678296f8df9b541f3b57efad07c3290ca69395 Mon Sep 17 00:00:00 2001 From: "Giau. Tran Minh" Date: Sat, 22 Apr 2023 09:56:03 +0700 Subject: [PATCH] chore: more tests Signed-off-by: Giau. Tran Minh --- internal/wire/testdata/Subtract/foo/wire.go | 7 +++++++ internal/wire/testdata/Subtract/want/wire_gen.go | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/internal/wire/testdata/Subtract/foo/wire.go b/internal/wire/testdata/Subtract/foo/wire.go index c3070b59..d2f23ea1 100644 --- a/internal/wire/testdata/Subtract/foo/wire.go +++ b/internal/wire/testdata/Subtract/foo/wire.go @@ -40,3 +40,10 @@ func injectFooBarService(name BarName, opts *FooOptions, bar *FakeBarService) *F wire.Bind(new(BarService), new(*FakeBarService)), )) } + +func injectNone(name BarName, foo Foo, bar *FakeBarService) *FooBar { + panic(wire.Build( + wire.Subtract(SuperSet, new(Foo), new(BarService)), + wire.Bind(new(BarService), new(*FakeBarService)), + )) +} diff --git a/internal/wire/testdata/Subtract/want/wire_gen.go b/internal/wire/testdata/Subtract/want/wire_gen.go index 5093baa9..130671c0 100644 --- a/internal/wire/testdata/Subtract/want/wire_gen.go +++ b/internal/wire/testdata/Subtract/want/wire_gen.go @@ -32,3 +32,11 @@ func injectFooBarService(name BarName, opts *FooOptions, bar *FakeBarService) *F } return fooBar } + +func injectNone(name BarName, foo Foo, bar *FakeBarService) *FooBar { + fooBar := &FooBar{ + BarService: bar, + Foo: foo, + } + return fooBar +}