diff options
author | md_5 <git@md-5.net> | 2018-07-20 10:20:15 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-07-20 10:20:15 +1000 |
commit | 49ac8a74461de1c2571296e300de001a93e00c75 (patch) | |
tree | aac0645901660ef9c95d135c39199491d62f7d82 /src/test/java/org/bukkit/BlockDataTest.java | |
parent | c1d9f942238443b0b3074b49e2c5f57700f8af3c (diff) | |
download | craftbukkit-49ac8a74461de1c2571296e300de001a93e00c75.tar craftbukkit-49ac8a74461de1c2571296e300de001a93e00c75.tar.gz craftbukkit-49ac8a74461de1c2571296e300de001a93e00c75.tar.lz craftbukkit-49ac8a74461de1c2571296e300de001a93e00c75.tar.xz craftbukkit-49ac8a74461de1c2571296e300de001a93e00c75.zip |
SPIGOT-4074: Fix createBlockData succeeding on garbage
Diffstat (limited to 'src/test/java/org/bukkit/BlockDataTest.java')
-rw-r--r-- | src/test/java/org/bukkit/BlockDataTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/BlockDataTest.java b/src/test/java/org/bukkit/BlockDataTest.java index a5cea50b..bd2c249b 100644 --- a/src/test/java/org/bukkit/BlockDataTest.java +++ b/src/test/java/org/bukkit/BlockDataTest.java @@ -44,6 +44,13 @@ public class BlockDataTest extends AbstractTestingBase { CraftBlockData.newData(Material.CAKE, "minecraft:cake[bites=3]"); } + @Test(expected = IllegalArgumentException.class) + public void testMistake() { + BlockData cakeTest = CraftBlockData.fromData(Blocks.CAKE.getBlockData().set(BlockCake.BITES, 3)); + + CraftBlockData.newData(Material.CAKE, cakeTest.toString()); + } + @Test public void testClone() { Cake cakeTest = (Cake) CraftBlockData.fromData(Blocks.CAKE.getBlockData().set(BlockCake.BITES, 3)); |