Following on redhat-developer/vscode-java#671, when trying to test Java 12 code using preview features, you need to add the --enable-preview flag in the test configuration's vmargs, in settings.json:
"java.test.config": [
{
"name": "java12",
"workingDirectory": "${workspaceFolder}",
"vmargs": [ "--enable-preview" ],
},
],
"java.test.defaultConfig": "java12"
This could be done automatically by the vscode-java-test extension. Also see microsoft/vscode-java-debug#553
Following on redhat-developer/vscode-java#671, when trying to test Java 12 code using preview features, you need to add the
--enable-previewflag in the test configuration'svmargs, in settings.json:This could be done automatically by the vscode-java-test extension. Also see microsoft/vscode-java-debug#553