package io.github.lukehutch.fastclasspathscanner.issues.issue80;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.Test;

import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner;
import io.github.lukehutch.fastclasspathscanner.utils.ReflectionUtils;

public class Issue80Test {
    @Test
    public void issue80() {
        // TODO: this test will fail in JDK9+, because there is no rt.jar.
        // TODO: Need to scan system modules when "!!" is in the scan spec.
        if (!ReflectionUtils.JAVA_VERSION_IS_9_PLUS) {
            assertThat(new FastClasspathScanner("!!", "java.util").scan().getNamesOfAllStandardClasses())
                    .contains("java.util.ArrayList");
        }
        assertThat(new FastClasspathScanner("java.util").scan().getNamesOfAllStandardClasses()).isEmpty();
    }
}

@@ -215,79 +215,8 @@
 ner;
-%0Aimport io.github.lukehutch.fastclasspathscanner.utils.ReflectionUtils;
 %0A%0Apu
@@ -282,218 +282,8 @@
 ) %7B%0A
-        // TODO: this test will fail in JDK9+, because there is no rt.jar.%0A        // TODO: Need to scan system modules when %22!!%22 is in the scan spec.%0A        if (!ReflectionUtils.JAVA_VERSION_IS_9_PLUS) %7B%0A    
     
@@ -396,20 +396,16 @@
         
-    
 .contain
@@ -434,125 +434,8 @@
 %22);%0A
-        %7D%0A        assertThat(new FastClasspathScanner(%22java.util%22).scan().getNamesOfAllStandardClasses()).isEmpty();%0A
     

Test now works out of the box on JDK9+