Did I accidentally commit test code?
Some checks failed
build-and-test / test (push) Failing after 55s
build-and-test / build (push) Successful in 1m15s
build-and-test / generate-javadoc (push) Successful in 1m17s

This commit is contained in:
JeremyStar™ 2024-08-31 13:23:35 +02:00
parent 6e7d660d70
commit f578360395
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -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");