mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 09:56:37 -04:00
wip integration testing
This commit is contained in:
parent
5d8e224c18
commit
7e616b6d28
37
pom.xml
37
pom.xml
@ -42,6 +42,10 @@
|
||||
</executions>
|
||||
<configuration>
|
||||
<jvmTarget>${maven.compiler.target}</jvmTarget>
|
||||
<sourceDirs>
|
||||
<sourceDir>${project.basedir}/src/test/java</sourceDir>
|
||||
<sourceDir>${project.basedir}/src/integration-test/kotlin</sourceDir>
|
||||
</sourceDirs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@ -139,6 +143,39 @@
|
||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||
<version>2.22.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>2.22.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>pre-integration-tests</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>de/bixilon/minosoft/setup/**</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>pre-integration-tests</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>integration-tests</id>
|
||||
<phase>integration-test</phase>
|
||||
<configuration>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>de/bixilon/minosoft/test/**</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>integration-tests</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.setup
|
||||
|
||||
import de.bixilon.kutil.latch.CountUpAndDownLatch
|
||||
import de.bixilon.minosoft.Minosoft
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
import org.junit.jupiter.api.Order
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
internal class MinosoftSIT {
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
fun initAssetsManager() {
|
||||
Minosoft.MINOSOFT_ASSETS_MANAGER.load(CountUpAndDownLatch(0))
|
||||
print("Initialized assets manager")
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.setup.data.registries.versions
|
||||
|
||||
import de.bixilon.kutil.latch.CountUpAndDownLatch
|
||||
import de.bixilon.minosoft.data.registries.versions.Versions
|
||||
import org.junit.jupiter.api.Order
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
internal class VersionsSIT {
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
fun loadVersionsJson() {
|
||||
Versions.load(CountUpAndDownLatch(0))
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.test.data.registries.versions
|
||||
|
||||
import de.bixilon.minosoft.data.registries.versions.Versions
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions
|
||||
import org.junit.jupiter.api.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
internal class VersionsIT {
|
||||
|
||||
@Test
|
||||
fun test1_17() {
|
||||
assertEquals(ProtocolVersions.V_1_17_1, Versions["1.17.1"]!!.versionId)
|
||||
}
|
||||
}
|
@ -213,7 +213,7 @@ class SolidCullSectionPreparer(
|
||||
val neighbourIndex = y shl 8 or heightmapIndex
|
||||
neighbourBlocks[ordinal] = section?.blocks?.unsafeGet(neighbourIndex)
|
||||
light[ordinal] = section?.light?.get(neighbourIndex) ?: 0x00
|
||||
if (position.y > chunk.light.heightmap[heightmapIndex]) {
|
||||
if (position.y >= chunk.light.heightmap[heightmapIndex]) {
|
||||
light[ordinal] = (light[ordinal].toInt() or SectionLight.SKY_LIGHT_MASK).toByte() // set sky light to 0x0F
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user