Search in sources :

Example 6 with Snippet

use of org.graalvm.polyglot.tck.Snippet in project graal by oracle.

the class ScriptTest method createScriptTests.

@Parameterized.Parameters(name = "{0}")
public static Collection<TestRun> createScriptTests() {
    context = new TestContext();
    final Collection<TestRun> res = new LinkedHashSet<>();
    for (String lang : TestUtil.getRequiredLanguages(context)) {
        for (Snippet script : context.getScripts(null, lang)) {
            res.add(new TestRun(new AbstractMap.SimpleImmutableEntry<>(lang, script), Collections.emptyList()));
        }
    }
    return res;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) Snippet(org.graalvm.polyglot.tck.Snippet)

Aggregations

Snippet (org.graalvm.polyglot.tck.Snippet)6 ArrayList (java.util.ArrayList)5 AbstractMap (java.util.AbstractMap)4 LinkedHashSet (java.util.LinkedHashSet)4 Map (java.util.Map)4 HashMap (java.util.HashMap)3 HashSet (java.util.HashSet)3 List (java.util.List)3 Entry (java.util.Map.Entry)1 PolyglotException (org.graalvm.polyglot.PolyglotException)1 Value (org.graalvm.polyglot.Value)1 TypeDescriptor (org.graalvm.polyglot.tck.TypeDescriptor)1