"""j2cl_optimization_test macro

See BooleansTest for an example usage.

"""

load("/third_party/java/j2cl/j2cl_library", "j2cl_library")
load("/third_party/java/j2cl/j2cl_test", "j2cl_test")

def j2cl_optimization_test(name, defs=[], javacopts=[]):
  j2cl_test(
    name = name,
    srcs = [name + ".java"],
    javacopts = javacopts,
    compile = 1,
    compiler = "//javascript/tools/jscompiler:head",
    data = ["//testing/matrix/nativebrowsers/chrome:stable_data"],
    extra_defs = [
        # Need to repeat compute_function_side_effects here, otherwise tests
        # fail even though the flag is part of our default test flags
        # for j2cl_test.
        # b/33067506
        "--compute_function_side_effects=true",
        "--rewrite_polyfills=false",
        "--strict",
        "--variable_renaming=OFF",
        "--define=jre.checkedMode=DISABLED",
    ] + defs,
    deps_mgmt = "closure",
    externs_list = ["//javascript/externs:common"],
    jvm_flags = ["-Dcom.google.testing.selenium.browser=CHROME_LINUX"],
    deps = [
        ":shared",
        "//third_party/java/junit:junit-j2cl",
        "//jre/java:gwt-jsinterop-annotations",
    ],
)

@@ -264,15 +264,15 @@
     
+  
 name
- = 
+=
 name
@@ -281,15 +281,15 @@
     
+  
 srcs
- = 
+=
 %5Bnam
@@ -306,16 +306,18 @@
 %22%5D,%0A    
+  
 javacopt
@@ -317,19 +317,17 @@
 avacopts
- = 
+=
 javacopt
@@ -337,21 +337,23 @@
     
+  
 compile
- = 
+=
 1,%0A
+  
     
@@ -360,19 +360,17 @@
 compiler
- = 
+=
 %22//javas
@@ -403,16 +403,18 @@
 d%22,%0A
+  
     data
  = %5B
@@ -409,19 +409,17 @@
     data
- = 
+=
 %5B%22//test
@@ -470,16 +470,18 @@
 %22%5D,%0A    
+  
 extra_de
@@ -482,19 +482,17 @@
 tra_defs
- = 
+=
 %5B%0A      
@@ -493,17 +493,37 @@
         
+ 
+ 
 #
+ TODO(b/33067506):
  Need to
@@ -590,16 +590,18 @@
         
+  
 # fail e
@@ -653,26 +653,16 @@
 st flags
-%0A        #
  for j2c
@@ -675,27 +675,8 @@
 .%0A  
-      # b/33067506%0A
     
@@ -727,16 +727,18 @@
         
+  
 %22--rewri
@@ -754,24 +754,26 @@
 lls=false%22,%0A
+  
         %22--s
@@ -788,16 +788,18 @@
         
+  
 %22--varia
@@ -825,16 +825,18 @@
         
+ 
+ 
 %22--defin
@@ -868,16 +868,18 @@
 D%22,%0A    
+  
 %5D + defs
@@ -880,24 +880,26 @@
 + defs,%0A    
+  
 deps_mgmt = 
@@ -895,19 +895,17 @@
 eps_mgmt
- = 
+=
 %22closure
@@ -911,16 +911,18 @@
 e%22,%0A    
+  
 externs_
@@ -925,19 +925,17 @@
 rns_list
- = 
+=
 %5B%22//java
@@ -963,16 +963,18 @@
 %22%5D,%0A    
+  
 jvm_flag
@@ -974,19 +974,17 @@
 vm_flags
- = 
+=
 %5B%22-Dcom.
@@ -1039,17 +1039,19 @@
     
+  
 deps
- = %5B%0A
+=%5B%0A  
     
@@ -1073,16 +1073,18 @@
         
+  
 %22//third
@@ -1114,16 +1114,18 @@
 -j2cl%22,%0A
+  
         
@@ -1168,13 +1168,14 @@
 s%22,%0A    
+  
 %5D,
-%0A
 )%0A

Convert to TODO format.