add another DirectedPropertyTest, reenable stair shape tests

This commit is contained in:
Bixilon 2023-06-04 20:40:28 +02:00
parent d4fccd1b98
commit b9dc8b0417
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 18 additions and 4 deletions

View File

@ -30,12 +30,10 @@ class StairsTest : BlockTest<Block>() {
super.retrieveBlock(MinecraftBlocks.OAK_STAIRS)
}
@Test(enabled = false) // ToDo: This test is correct, but failing
fun testLightPropertiesNorth() {
block.withProperties(BlockProperties.FACING to Directions.NORTH).testLightProperties(0, true, true, false, booleanArrayOf(false, true, false, true, true, true))
}
@Test(enabled = false) // ToDo: This test is correct, but failing
fun testLightPropertiesSouth() {
block.withProperties(BlockProperties.FACING to Directions.SOUTH).testLightProperties(0, true, true, false, booleanArrayOf(false, true, true, false, true, true))
}

View File

@ -111,7 +111,23 @@ internal class DirectedPropertyTest {
}
@Test
fun testSideCovered8() { // overlapping
fun testSideCovered8() {
val shape = VoxelShape(
AABB(0.0f, 0.0f, 0.0f, 1.0f, 0.5f, 1.0f),
AABB(0.0f, 0.5f, 0.5f, 1.0f, 1.0f, 1.0f),
)
assertTrue(shape.isSideCovered(Directions.DOWN))
assertFalse(shape.isSideCovered(Directions.UP))
assertFalse(shape.isSideCovered(Directions.NORTH))
assertTrue(shape.isSideCovered(Directions.SOUTH))
assertFalse(shape.isSideCovered(Directions.WEST))
assertFalse(shape.isSideCovered(Directions.EAST))
}
@Test
fun testSideCovered9() { // overlapping
val shape = VoxelShape(
AABB(0.0f, 0.0f, 0.0f, 1.0f, 0.6f, 1.0f),
AABB(0.0f, 0.4f, 0.5f, 1.0f, 1.0f, 1.0f),
@ -126,7 +142,7 @@ internal class DirectedPropertyTest {
}
// @Test // TODO: This test is correct, isSideCovered is broken
fun testSideCovered9() { // overlapping
fun testSideCovered10() { // overlapping
val shape = VoxelShape(
AABB(0.0f, 0.0f, 0.0f, 1.0f, 0.6f, 1.0f),
AABB(0.1f, 0.0f, 0.0f, 0.9f, 0.8f, 1.0f),