Fix ParchmentMappingLayerTest test ()

* Fix ParchmentMappingLayerTest test

* Update mapping-io

* Remove comment
This commit is contained in:
shedaniel 2021-09-11 21:39:19 +08:00 committed by GitHub
parent 2c464cdef3
commit df7f56306b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions
build.gradle
src/test/groovy/net/fabricmc/loom/test/unit/layeredmappings

View file

@ -82,7 +82,7 @@ dependencies {
implementation ('net.fabricmc:tiny-mappings-parser:0.3.0+build.17')
implementation 'net.fabricmc:access-widener:1.1.0'
implementation 'net.fabricmc:mapping-io:0.2.0'
implementation 'net.fabricmc:mapping-io:0.2.1'
implementation ('net.fabricmc:lorenz-tiny:3.0.0') {
transitive = false

View file

@ -38,7 +38,7 @@ class ParchmentMappingLayerTest extends LayeredMappingsSpecification {
def mappings = getLayeredMappings(
new IntermediaryMappingsSpec(),
new MojangMappingsSpec(),
new ParchmentMappingsSpec(PARCHMENT_NOTATION, true)
new ParchmentMappingsSpec(PARCHMENT_NOTATION, false)
)
def tiny = getTiny(mappings)
def reorderedMappings = reorder(mappings)
@ -48,7 +48,7 @@ class ParchmentMappingLayerTest extends LayeredMappingsSpecification {
mappings.classes.size() == 5747
mappings.classes[0].srcName.hashCode() == -1112444138 // MojMap name, just check the hash
mappings.classes[0].getDstName(0) == "net/minecraft/class_2573"
mappings.classes[0].methods[0].args[0].srcName.hashCode() == 109757064
mappings.classes[0].methods[0].args[0].srcName.hashCode() == -1008297992
reorderedMappings.getClass("net/minecraft/class_2573").getMethod("method_10913", "(Lnet/minecraft/class_1799;Lnet/minecraft/class_1767;)V").args.size() > 0
}
@ -64,12 +64,14 @@ class ParchmentMappingLayerTest extends LayeredMappingsSpecification {
new ParchmentMappingsSpec(PARCHMENT_NOTATION, true)
)
def tiny = getTiny(mappings)
def reorderedMappings = reorder(mappings)
then:
mappings.srcNamespace == "named"
mappings.dstNamespaces == ["intermediary", "official"]
mappings.classes.size() == 5747
mappings.classes[0].srcName.hashCode() == -1112444138 // MojMap name, just check the hash
mappings.classes[0].getDstName(0) == "net/minecraft/class_2573"
mappings.classes[0].methods[0].args[0].srcName == "stack"
mappings.classes[0].methods[0].args[0].srcName.hashCode() == 109757064
reorderedMappings.getClass("net/minecraft/class_2573").getMethod("method_10913", "(Lnet/minecraft/class_1799;Lnet/minecraft/class_1767;)V").args.size() > 0
}
}