summaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorAndrew Ardill <andrew.ardill@gmail.com>2011-12-29 22:42:47 +1100
committerAndrew Ardill <andrew.ardill@gmail.com>2011-12-29 22:44:58 +1100
commit5124f8f4626a49726f740749865837e8d671c248 (patch)
tree58b306bef02b5c7522a2216933b32fe99c971e48 /src/test/java
parent8b735bf47a17091286771def2c72a57ca7f6eb50 (diff)
downloadcraftbukkit-5124f8f4626a49726f740749865837e8d671c248.tar
craftbukkit-5124f8f4626a49726f740749865837e8d671c248.tar.gz
craftbukkit-5124f8f4626a49726f740749865837e8d671c248.tar.lz
craftbukkit-5124f8f4626a49726f740749865837e8d671c248.tar.xz
craftbukkit-5124f8f4626a49726f740749865837e8d671c248.zip
Test cloning of CraftItemStacks created with null nms ItemStacks
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java
index 28ad98a5..a57ddca6 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/CraftItemStackTest.java
@@ -25,4 +25,12 @@ public class CraftItemStackTest {
assert (clone.getTypeId() == itemStack.getTypeId());
assert (clone.getData().equals(itemStack.getData()));
}
+
+ @Test
+ public void testCloneNullItem() throws Exception {
+ net.minecraft.server.ItemStack nmsItemStack = null;
+ ItemStack itemStack = new CraftItemStack(nmsItemStack);
+ ItemStack clone = itemStack.clone();
+ assert (clone.equals(itemStack));
+ }
}