-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaks some downstream tests that assumed the error message was writt…
…en a certain way. PiperOrigin-RevId: 698877656
- Loading branch information
1 parent
bf43b4f
commit fd77c95
Showing
8 changed files
with
19 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,9 +41,7 @@ | |
import org.junit.runner.RunWith; | ||
import org.junit.runners.JUnit4; | ||
|
||
/** | ||
* @author [email protected] (Jesse Wilson) | ||
*/ | ||
/** @author [email protected] (Jesse Wilson) */ | ||
@RunWith(JUnit4.class) | ||
public class ParentInjectorTest { | ||
|
||
|
@@ -72,10 +70,8 @@ public void testParentJitBindingWontClobberChildBinding() { | |
} catch (ConfigurationException e) { | ||
assertContains( | ||
e.getMessage(), | ||
"A binding for ParentInjectorTest$A already exists in one or more child injectors or" | ||
+ " private modules. Bindings from children can only be used by a parent if the child" | ||
+ " was a PrivateModule and the binding was exposed. Parent injectors cannot create" | ||
+ " bindings that already exist in a child.", | ||
"Unable to create binding for ParentInjectorTest$A because it was already configured on" | ||
+ " one or more child injectors or private modules.", | ||
"ParentInjectorTest$9.configure"); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,7 @@ | |
import java.util.List; | ||
import junit.framework.TestCase; | ||
|
||
/** | ||
* @author [email protected] (Jesse Wilson) | ||
*/ | ||
/** @author [email protected] (Jesse Wilson) */ | ||
public class PrivateModuleTest extends TestCase { | ||
|
||
public void testBasicUsage() { | ||
|
@@ -591,10 +589,8 @@ public void testParentBindsSomethingInPrivate() { | |
assertEquals(1, expected.getErrorMessages().size()); | ||
assertContains( | ||
expected.toString(), | ||
"A binding for List<String> already exists in one or more child injectors", | ||
" or private modules. Bindings from children can only be used by a parent if the child", | ||
" was a PrivateModule and the binding was exposed. Parent injectors cannot create", | ||
" bindings that already exist in a child.", | ||
"Unable to create binding for List<String> ", | ||
"because it was already configured on one or more child injectors or private modules.", | ||
"1 : PrivateModuleTest$FailingPrivateModule.configure", | ||
"PrivateModuleTest$FailingModule -> PrivateModuleTest$ManyPrivateModules ->" | ||
+ " PrivateModuleTest$FailingPrivateModule", | ||
|
@@ -614,10 +610,8 @@ public void testParentBindingToPrivateLinkedJitBinding() { | |
assertEquals(1, expected.getErrorMessages().size()); | ||
assertContains( | ||
expected.toString(), | ||
"A binding for List<String> already exists in one or more child injectors", | ||
" or private modules. Bindings from children can only be used by a parent if the child", | ||
" was a PrivateModule and the binding was exposed. Parent injectors cannot create", | ||
" bindings that already exist in a child.", | ||
"Unable to create binding for List<String> because it was already configured on one or" | ||
+ " more child injectors or private modules", | ||
"1 : PrivateModuleTest$FailingPrivateModule.configure", | ||
"PrivateModuleTest$ManyPrivateModules -> PrivateModuleTest$FailingPrivateModule", | ||
"2 : PrivateModuleTest$SecondFailingPrivateModule.configure", | ||
|
@@ -634,10 +628,8 @@ public void testParentBindingToPrivateJitBinding() { | |
assertEquals(1, expected.getErrorMessages().size()); | ||
assertContains( | ||
expected.toString(), | ||
"A binding for PrivateModuleTest$PrivateFoo already exists in one or more child", | ||
" injectors or private modules. Bindings from children can only be used by a parent if", | ||
" the child was a PrivateModule and the binding was exposed. Parent injectors cannot", | ||
" create bindings that already exist in a child.", | ||
"Unable to create binding for PrivateModuleTest$PrivateFoo because it was already" | ||
+ " configured on one or more child injectors or private modules.", | ||
"as a just-in-time binding"); | ||
} | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
...t/com/google/inject/errors/testdata/child_binding_already_set_by_just_in_time_binding.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
core/test/com/google/inject/errors/testdata/child_binding_already_set_error.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...test/com/google/inject/errors/testdata/child_binding_already_set_multiple_times_error.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
core/test/com/google/inject/errors/testdata/multiple_child_binding_already_set_errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters