Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Bao committed Sep 9, 2024
1 parent 02d001c commit b09a48b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/shell/test_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,13 @@ java_toolchain_javacopts_are_used(){
--verbose_failures //test_expect_failure/compilers_javac_opts:can_configure_jvm_flags_for_javac_via_javacopts
}

java_toolchain_javacopts_can_be_overridden(){
action_should_fail_with_message \
"invalid target release: InvalidTarget" \
build \
--verbose_failures //test_expect_failure/compilers_javac_opts:can_override_default_toolchain_flags_for_javac_via_javacopts
}

$runner test_scalaopts_from_scala_toolchain
$runner java_toolchain_javacopts_are_used
$runner java_toolchain_javacopts_can_be_overridden
6 changes: 6 additions & 0 deletions test_expect_failure/compilers_javac_opts/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ scala_library(
name = "can_configure_jvm_flags_for_javac_via_javacopts",
srcs = ["WillNotCompileSinceJavaToolchainAddsAnInvalidJvmFlag.java"],
)

scala_library(
name = "can_override_default_toolchain_flags_for_javac_via_javacopts",
srcs = ["WillNotCompileSinceJavaToolchainAddsAnInvalidJvmFlag.java"],
javacopts = ["-target InvalidTarget"]
)

0 comments on commit b09a48b

Please sign in to comment.