issue 496 -- ConstantBindingBuilder was missing to(byte), forgot to commit test.
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1315 d779f126-a31b-0410-b53b-1d3aecad763e
diff --git a/core/test/com/google/inject/spi/ElementsTest.java b/core/test/com/google/inject/spi/ElementsTest.java
index d1275c7..0854447 100644
--- a/core/test/com/google/inject/spi/ElementsTest.java
+++ b/core/test/com/google/inject/spi/ElementsTest.java
@@ -189,6 +189,7 @@
bindConstant().annotatedWith(Names.named("float")).to(6.0f);
bindConstant().annotatedWith(Names.named("short")).to((short) 7);
bindConstant().annotatedWith(Names.named("char")).to('h');
+ bindConstant().annotatedWith(Names.named("byte")).to((byte) 8);
bindConstant().annotatedWith(Names.named("Class")).to(Iterator.class);
bindConstant().annotatedWith(Names.named("Enum")).to(CoinSide.TAILS);
}
@@ -265,6 +266,15 @@
return null;
}
},
+
+ new FailingElementVisitor() {
+ @Override public <T> Void visit(Binding<T> command) {
+ assertTrue(command instanceof InstanceBinding);
+ assertEquals(Key.get(Byte.class, Names.named("byte")), command.getKey());
+ assertEquals((byte) 8, getInstance(command));
+ return null;
+ }
+ },
new FailingElementVisitor() {
@Override public <T> Void visit(Binding<T> command) {