<commit_before>"""j2cl_multi_test build rule

Creates a j2cl_test target for compiled and uncompiled mode.


Example use:

j2cl_multi_test(
    name = "my_test",
    test_class = ["MyJavaTestFile.java"],
)

"""

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


def j2cl_multi_test(name, test_class, **kwargs):
  deps = [":emul_tests_lib", "//third_party/java/junit:junit-j2cl"]
  j2cl_test(name=name,
            test_class=test_class,
            generate_build_test=False,
            runtime_deps=deps,
            **kwargs)
  j2cl_test(name=name + "_compiled",
            test_class=test_class,
            compile=1,
            generate_build_test=False,
            runtime_deps=deps,
            extra_defs= [
                # JRE tests use $doc and do other illegal things on purpose.
                # b/33055288
                "--jscomp_off=undefinedVars",
                "--jscomp_off=checkTypes",
            ],
            **kwargs)<commit_msg>Import: Reduces JSNI in JRE tests<commit_after>"""j2cl_multi_test build rule

Creates a j2cl_test target for compiled and uncompiled mode.


Example use:

j2cl_multi_test(
    name = "my_test",
    test_class = ["MyJavaTestFile.java"],
)

"""

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


def j2cl_multi_test(name, test_class, **kwargs):
  deps = [":emul_tests_lib", "//third_party/java/junit:junit-j2cl"]
  j2cl_test(name=name,
            test_class=test_class,
            generate_build_test=False,
            runtime_deps=deps,
            **kwargs)
  j2cl_test(name=name + "_compiled",
            test_class=test_class,
            compile=1,
            generate_build_test=False,
            runtime_deps=deps,
            **kwargs)
{'fraction_non_alphanumeric': 0.11265969802555169, 'fraction_numerical': 0.017421602787456445, 'mean_word_length': 2.5091649694501017, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1764491', 'n_tokens_mistral': 605, 'n_tokens_neox': 586, 'n_words': 99}