mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-12 03:24:14 +00:00
test:
- Added shared style generator test, expected to fail until the fix Ref.: https://github.com/VolmitSoftware/Iris/issues/1251
This commit is contained in:
@@ -67,6 +67,12 @@ public class ContinentGeneratorTest {
|
||||
assertArrayEquals(sampleOverworldContinentMapAtWorldStart(), sampleContinentMapAfterRebuild(overworldStyleDimension), 0D);
|
||||
}
|
||||
|
||||
@ExpectedToFailUntilFixed(SHARED_STYLE_GENERATOR_BUG)
|
||||
@Test
|
||||
public void doesBuildingTheContinentMapLeaveTheSharedStyleGeneratorUnscaled() {
|
||||
assertArrayEquals(sampleUntouchedSharedStyleGenerator(), sampleSharedStyleGeneratorAfterContinentMapBuilt(baseZoomDimension), 0D);
|
||||
}
|
||||
|
||||
private double[] sampleContinentMapAtWorldStart(IrisDimension dimension) {
|
||||
return sampleContinentMap(dimension, SAMPLE_BLOCKS);
|
||||
}
|
||||
@@ -89,6 +95,19 @@ public class ContinentGeneratorTest {
|
||||
return sampleContinentMapAtWorldStart(createDimensionWithOverworldContinentalStyle());
|
||||
}
|
||||
|
||||
private double[] sampleSharedStyleGeneratorAfterContinentMapBuilt(IrisDimension dimension) {
|
||||
sampleContinentMapAtWorldStart(dimension);
|
||||
return sampleSharedStyleGenerator(dimension.getContinentalStyle());
|
||||
}
|
||||
|
||||
private double[] sampleUntouchedSharedStyleGenerator() {
|
||||
return sampleSharedStyleGenerator(createSimplexStyle());
|
||||
}
|
||||
|
||||
private double[] sampleSharedStyleGenerator(IrisGeneratorStyle style) {
|
||||
return sampleAtBlocks(style.create(ContinentGenerator.deriveContinentSeed(new RNG(WORLD_SEED)), packData), SAMPLE_BLOCKS);
|
||||
}
|
||||
|
||||
private double[] sampleContinentMap(IrisDimension dimension, double[][] blocks) {
|
||||
return sampleAtBlocks(ContinentGenerator.create(dimension, new RNG(WORLD_SEED), packData), blocks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user