use of net.glowstone.util.nbt.Tag in project Glowstone by GlowstoneMC.
the class MojangsonParseTest method canParseType.
@Test
public void canParseType() {
try {
CompoundTag compound = Mojangson.parseCompound(testCase.getValue());
Tag value = compound.getValue().get("value");
// Checks if the TagType of the case and the parsed type are equal.
if (value.getType() != testCase.getKey()) {
fail("Incorrect type parsing for case " + testCase.getKey().getName() + " (Got " + value.getType().getName() + ") for Mojansgon: " + testCase.getValue());
}
} catch (MojangsonParseException e) {
// Catches a parse failure.
fail("Could not parse case for " + testCase.getKey().getName() + "( " + testCase.getValue() + "): " + e.getMessage());
}
}
Aggregations