Skip to content

Commit 5f45758

Browse files
committed
Added Kotlin Test lib
1 parent 5bfeab0 commit 5f45758

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

common/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ dependencies {
5555

5656
// Baritone
5757
modImplementation("baritone-api:baritone-unoptimized-fabric:1.10.2") { isTransitive = false }
58+
testImplementation(kotlin("test"))
5859
}
5960

6061
tasks {
@@ -66,3 +67,9 @@ tasks {
6667
useJUnitPlatform()
6768
}
6869
}
70+
71+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
72+
kotlinOptions {
73+
jvmTarget = "17"
74+
}
75+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import com.lambda.util.world.FastVector
2+
import com.lambda.util.world.fastVectorOf
3+
import com.lambda.util.world.x
4+
import com.lambda.util.world.y
5+
import com.lambda.util.world.z
6+
import kotlin.test.Test
7+
8+
/*
9+
* Copyright 2025 Lambda
10+
*
11+
* This program is free software: you can redistribute it and/or modify
12+
* it under the terms of the GNU General Public License as published by
13+
* the Free Software Foundation, either version 3 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU General Public License
22+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
*/
24+
25+
26+
class FastVectorTest {
27+
@Test
28+
fun testZero() {
29+
val vec = fastVectorOf(0, 0, 0)
30+
assert(vec.x == 0)
31+
assert(vec.y == 0)
32+
assert(vec.z == 0)
33+
}
34+
}

0 commit comments

Comments
 (0)