Skip to content

Commit

Permalink
Merge pull request #2 from Zerumi/golden-tests
Browse files Browse the repository at this point in the history
Golden tests
  • Loading branch information
Zerumi authored Apr 21, 2024
2 parents 6d3a311 + f5e8c0f commit d87c4d1
Show file tree
Hide file tree
Showing 45 changed files with 68,381 additions and 380 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion asm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,31 @@ repositories {
}

application {
mainClass = "MainKt"
mainClass = "io.github.zerumi.csa3.asm.MainKt"
}

dependencies {
implementation(project(":isa"))
testImplementation("org.jetbrains.kotlin:kotlin-test")
}

tasks.withType(Jar::class) {
manifest {
attributes["Manifest-Version"] = "1.0"
attributes["Main-Class"] = "MainKt"
}
// To avoid the duplicate handling strategy error
duplicatesStrategy = DuplicatesStrategy.EXCLUDE

// To add all the dependencies
from(sourceSets.main.get().output)

dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}

tasks.test {
useJUnitPlatform()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
package io.github.zerumi.csa3.asm

import io.github.zerumi.csa3.isa.writeCode

fun main(args: Array<String>) {
val sourceFile = args[0]
val targetFile = args[1]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
package io.github.zerumi.csa3.asm

import io.github.zerumi.csa3.isa.MemoryCell
import io.github.zerumi.csa3.isa.Opcode
import io.github.zerumi.csa3.isa.Program
import java.io.File

private fun meaningfulToken(line: String): String {
Expand Down
1 change: 0 additions & 1 deletion asm/src/main/resources/examples/hello.sasm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ hello_str:
word 33 ; '!'
word 0 ; \0


print_char:
lit port ; symbol port_addr
load ; symbol port
Expand Down
Loading

0 comments on commit d87c4d1

Please sign in to comment.