Use ParsedFlagsFunction to create test configurations.

Work towards platform-based flags: #19409.

This includes a lot of test cleanup to remove the artificial separation between Starlark and native flags. Unfortunately it wasn't feasible to split these into multiple changes.

PiperOrigin-RevId: 605613922
Change-Id: I3c090e1b8968dba8a1d38cf24acb948824dca1b4
diff --git a/src/test/java/com/google/devtools/build/lib/starlark/StarlarkOptionsParsingTest.java b/src/test/java/com/google/devtools/build/lib/starlark/StarlarkOptionsParsingTest.java
index ff047f5..75875d6 100644
--- a/src/test/java/com/google/devtools/build/lib/starlark/StarlarkOptionsParsingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/starlark/StarlarkOptionsParsingTest.java
@@ -18,7 +18,6 @@
 import static org.junit.Assert.assertThrows;
 
 import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.events.Event;
 import com.google.devtools.build.lib.events.ExtendedEventHandler;
 import com.google.devtools.build.lib.events.ExtendedEventHandler.Postable;
@@ -390,7 +389,7 @@
   public void testExpectedBuildEventOutput_asFlag() throws Exception {
     writeBasicIntFlag();
     scratch.file("blah/BUILD", "cc_library(name = 'mylib')");
-    useConfiguration(ImmutableMap.of("//test:my_int_setting", "15"));
+    useConfiguration("--//test:my_int_setting=15");
     update(
         ImmutableList.of("//blah:mylib"),
         /*keepGoing=*/ false,
@@ -413,7 +412,7 @@
   public void testExpectedBuildEventOutput_asTarget() throws Exception {
     writeBasicIntFlag();
     scratch.file("blah/BUILD", "cc_library(name = 'mylib')");
-    useConfiguration(ImmutableMap.of("//test:my_int_setting", "15"));
+    useConfiguration("--//test:my_int_setting=15");
     update(
         ImmutableList.of("//blah:mylib", "//test:my_int_setting"),
         /*keepGoing=*/ false,