Fix up test(s)
This commit is contained in:
@@ -707,7 +707,6 @@ void main() {
|
|||||||
};
|
};
|
||||||
list.enableAll();
|
list.enableAll();
|
||||||
final order = list.generateLoadOrder();
|
final order = list.generateLoadOrder();
|
||||||
|
|
||||||
final expected = [
|
final expected = [
|
||||||
'zetrith.prepatcher',
|
'zetrith.prepatcher',
|
||||||
'brrainz.harmony',
|
'brrainz.harmony',
|
||||||
@@ -717,6 +716,28 @@ void main() {
|
|||||||
'ludeon.rimworld.biotech',
|
'ludeon.rimworld.biotech',
|
||||||
'ludeon.rimworld.ideology',
|
'ludeon.rimworld.ideology',
|
||||||
'ludeon.rimworld.royalty',
|
'ludeon.rimworld.royalty',
|
||||||
|
'rah.rbse',
|
||||||
|
'mlie.usethisinstead',
|
||||||
|
'dubwise.rimatomics',
|
||||||
|
'jecrell.doorsexpanded',
|
||||||
|
'balistafreak.stopdropandroll',
|
||||||
|
'fluffy.animaltab',
|
||||||
|
'gt.sam.glittertech',
|
||||||
|
'dubwise.rimefeller',
|
||||||
|
'darthcy.misc.morebetterdeepdrill',
|
||||||
|
'haplo.miscellaneous.training',
|
||||||
|
'linkolas.stabilize',
|
||||||
|
'dubwise.dubsperformanceanalyzer.steam',
|
||||||
|
'memegoddess.searchanddestroy',
|
||||||
|
'gogatio.mechanoidupgrades',
|
||||||
|
'issaczhuang.muzzleflash',
|
||||||
|
'smashphil.vehicleframework',
|
||||||
|
'cabbage.rimcities',
|
||||||
|
'vis.staticquality',
|
||||||
|
'automatic.bionicicons',
|
||||||
|
'vanillaexpanded.vanillatraitsexpanded',
|
||||||
|
'tk421storm.ragdoll',
|
||||||
|
'andromeda.nicehealthtab',
|
||||||
];
|
];
|
||||||
expect(order.loadOrder, equals(expected));
|
expect(order.loadOrder, equals(expected));
|
||||||
});
|
});
|
||||||
|
@@ -782,10 +782,7 @@ void main() {
|
|||||||
expect(result.loadOrder.contains('existingMod'), isTrue);
|
expect(result.loadOrder.contains('existingMod'), isTrue);
|
||||||
|
|
||||||
// The existing loadAfter relationship should be honored
|
// The existing loadAfter relationship should be honored
|
||||||
expect(
|
expect(result.loadOrder, equals(expected));
|
||||||
result.loadOrder.indexOf('existingMod'),
|
|
||||||
lessThan(result.loadOrder.indexOf('modA')),
|
|
||||||
);
|
|
||||||
|
|
||||||
// System should track or report the missing loadAfter targets
|
// System should track or report the missing loadAfter targets
|
||||||
expect(result.errors, isEmpty); // Soft constraints shouldn't cause errors
|
expect(result.errors, isEmpty); // Soft constraints shouldn't cause errors
|
||||||
@@ -822,8 +819,7 @@ void main() {
|
|||||||
isFalse,
|
isFalse,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Mod should still be , equals(expected)pendencies
|
expect(result.loadOrder, equals(expected));
|
||||||
expect(result.loadOrder.contains('modA'), isTrue);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -691,52 +691,41 @@ void main() {
|
|||||||
test('Should not fuck up troubleshooter', () {
|
test('Should not fuck up troubleshooter', () {
|
||||||
final troubleshooter = ModListTroubleshooter(modList);
|
final troubleshooter = ModListTroubleshooter(modList);
|
||||||
final expectedFirst = [
|
final expectedFirst = [
|
||||||
'test.mod1',
|
'test.mod10',
|
||||||
// 0 depends on 1
|
'test.mod9',
|
||||||
'test.mod0',
|
'test.mod8',
|
||||||
'test.mod2',
|
'test.mod2',
|
||||||
// 3 depends on 4
|
|
||||||
'test.mod4',
|
'test.mod4',
|
||||||
'test.mod3',
|
'test.mod3',
|
||||||
'test.mod5',
|
'test.mod5',
|
||||||
// 6 depends on 7
|
|
||||||
'test.mod7',
|
'test.mod7',
|
||||||
'test.mod6',
|
'test.mod6',
|
||||||
'test.mod8',
|
'test.mod1',
|
||||||
// 9 depends on 10
|
'test.mod0',
|
||||||
'test.mod10',
|
|
||||||
'test.mod9',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
var result = troubleshooter.linearForward(stepSize: 10);
|
var result = troubleshooter.linearForward(stepSize: 10);
|
||||||
var loadOrder = result.loadRequired();
|
var loadOrder = result.loadRequired();
|
||||||
expect(loadOrder.loadOrder.length, equals(11));
|
expect(loadOrder.loadOrder.length, equals(11));
|
||||||
for (int i = 0; i < expectedFirst.length; i++) {
|
expect(loadOrder.loadOrder, equals(expectedFirst));
|
||||||
expect(loadOrder.loadOrder[i], equals(expectedFirst[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
final expectedSecond = [
|
final expectedSecond = [
|
||||||
'test.mod10',
|
'test.mod19',
|
||||||
|
'test.mod18',
|
||||||
|
'test.mod17',
|
||||||
'test.mod11',
|
'test.mod11',
|
||||||
// 12 depends on 13
|
|
||||||
'test.mod13',
|
'test.mod13',
|
||||||
'test.mod12',
|
'test.mod12',
|
||||||
'test.mod14',
|
'test.mod14',
|
||||||
// 15 depends on 16
|
|
||||||
'test.mod16',
|
'test.mod16',
|
||||||
'test.mod15',
|
'test.mod15',
|
||||||
'test.mod17',
|
'test.mod10',
|
||||||
// 18 depends on 19
|
|
||||||
'test.mod19',
|
|
||||||
'test.mod18',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
result = troubleshooter.linearForward(stepSize: 10);
|
result = troubleshooter.linearForward(stepSize: 10);
|
||||||
loadOrder = result.loadRequired();
|
loadOrder = result.loadRequired();
|
||||||
expect(loadOrder.loadOrder.length, equals(10));
|
expect(loadOrder.loadOrder.length, equals(10));
|
||||||
for (int i = 0; i < expectedSecond.length; i++) {
|
expect(loadOrder.loadOrder, equals(expectedSecond));
|
||||||
expect(loadOrder.loadOrder[i], equals(expectedSecond[i]));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user