Did I accidentally commit test code?
This commit is contained in:
parent
6e7d660d70
commit
f578360395
1 changed files with 0 additions and 54 deletions
|
@ -119,60 +119,6 @@ public final class Main {
|
||||||
// Say hello to the world!
|
// Say hello to the world!
|
||||||
logger.info("Hello world!");
|
logger.info("Hello world!");
|
||||||
|
|
||||||
// DependencyResolver test
|
|
||||||
DependencyResolver resolver = new DependencyResolver();
|
|
||||||
|
|
||||||
Set<@NotNull String> depsT1 = new HashSet<>();
|
|
||||||
Set<@NotNull String> provT1 = new HashSet<>();
|
|
||||||
Set<@NotNull String> depsT2 = new HashSet<>();
|
|
||||||
Set<@NotNull String> provT2 = new HashSet<>();
|
|
||||||
Set<@NotNull String> depsT3 = new HashSet<>();
|
|
||||||
Set<@NotNull String> provT3 = new HashSet<>();
|
|
||||||
Set<@NotNull String> depsT4 = new HashSet<>();
|
|
||||||
Set<@NotNull String> provT4 = new HashSet<>();
|
|
||||||
|
|
||||||
depsT2.add("test1=5");
|
|
||||||
provT3.add("test5=11");
|
|
||||||
depsT4.add("test3>100<10");
|
|
||||||
|
|
||||||
resolver.addVectors(new DependencyVector[]{
|
|
||||||
new DependencyVector.Builder()
|
|
||||||
.setIdentifier("test1")
|
|
||||||
.setVersioningSystem(OneNumberVersioningSystem.class)
|
|
||||||
.setVersion("5")
|
|
||||||
.setDependencies(depsT1)
|
|
||||||
.setProvides(provT1)
|
|
||||||
.build(),
|
|
||||||
new DependencyVector.Builder()
|
|
||||||
.setIdentifier("test2")
|
|
||||||
.setVersioningSystem(OneNumberVersioningSystem.class)
|
|
||||||
.setVersion("1")
|
|
||||||
.setDependencies(depsT2)
|
|
||||||
.setProvides(provT2)
|
|
||||||
.build(),
|
|
||||||
new DependencyVector.Builder()
|
|
||||||
.setIdentifier("test3")
|
|
||||||
.setVersioningSystem(OneNumberVersioningSystem.class)
|
|
||||||
.setVersion("106")
|
|
||||||
.setDependencies(depsT3)
|
|
||||||
.setProvides(provT3)
|
|
||||||
.build(),
|
|
||||||
new DependencyVector.Builder()
|
|
||||||
.setIdentifier("test4")
|
|
||||||
.setVersioningSystem(OneNumberVersioningSystem.class)
|
|
||||||
.setVersion("69")
|
|
||||||
.setDependencies(depsT4)
|
|
||||||
.setProvides(provT4)
|
|
||||||
.build()
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
resolver.resolve();
|
|
||||||
} catch (Exception exception) {
|
|
||||||
logger.crash("Test resolution failed", exception);
|
|
||||||
}
|
|
||||||
logger.warn("Test resolution succeeded");
|
|
||||||
|
|
||||||
// Choose windowing API to use
|
// Choose windowing API to use
|
||||||
if (!WindowingSubsystem.getInstance().setApi())
|
if (!WindowingSubsystem.getInstance().setApi())
|
||||||
logger.crash("No windowing API is compatible");
|
logger.crash("No windowing API is compatible");
|
||||||
|
|
Loading…
Reference in a new issue