mirror of
https://github.com/HMCore/Core.git
synced 2025-12-12 13:56:19 +00:00
merged changes
This commit is contained in:
27
.github/workflows/gradle.yml
vendored
Normal file
27
.github/workflows/gradle.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
# This workflow will build a Java project with Gradle
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Java CI with Gradle
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
19
src/test/kotlin/org/hmcore/tests/KotlinTests.kt
Normal file
19
src/test/kotlin/org/hmcore/tests/KotlinTests.kt
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.hmcore.tests
|
||||
|
||||
import org.hmcore.HMCore
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
// The primary function of the Kotlin tests is to ensure Kotlin-specific features are preserved
|
||||
// Meaning some tests might only make sure features work at compile time.
|
||||
|
||||
class KotlinTests {
|
||||
@Test
|
||||
fun `Module should support index access operator`() {
|
||||
HMCore.modules["ores"]?.apply { this["other"] }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Module should support 'in' keyword`() {
|
||||
HMCore.modules["ores"]?.let { "copper" in it }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user