8138993: JEP-JDK-8046155: Test task: add check for Compiler.directives_print diagnostic command

Test Compiler.directive_print command

Reviewed-by: iignatyev, neliasso
This commit is contained in:
Pavel Punegov 2015-11-24 20:55:46 +03:00
parent faa5a2381c
commit 06c9ee5a1c
9 changed files with 265 additions and 35 deletions

View file

@ -36,6 +36,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.concurrent.Callable;
import java.util.stream.Collectors;
/**
* Directive file and state builder class
@ -66,7 +67,10 @@ public class DirectiveBuilder implements StateBuilder<CompileCommand> {
@Override
public List<CompileCommand> getCompileCommands() {
throw new Error("TESTBUG: isn't applicable for directives");
return matchBlocks.keySet().stream()
// only method descriptor is required to check print_directives
.map(md -> new CompileCommand(null, md, null, null))
.collect(Collectors.toList());
}
@Override