aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
diff options
context:
space:
mode:
authorGravatar cushon <cushon@google.com>2018-02-24 14:05:37 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-24 14:07:29 -0800
commit978cb00899ec7ddaa0512c6b5c8a2dae8bfc1146 (patch)
treec458687c04e96432c0da9f2d6155062e57653739 /src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
parent9817539fbd399bbc2751d7527d3b1c0a104a5ad6 (diff)
expectThrows has been renamed to assertThrows
More information: https://github.com/junit-team/junit5/issues/531 PiperOrigin-RevId: 186900384
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
index 6d78fe5e69..edb8d48fbb 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
@@ -16,7 +16,7 @@ package com.google.devtools.build.lib.skylark;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
-import static com.google.devtools.build.lib.testutil.MoreAsserts.expectThrows;
+import static com.google.devtools.build.lib.testutil.MoreAsserts.assertThrows;
import static org.junit.Assert.fail;
import com.google.common.collect.ImmutableList;
@@ -2088,8 +2088,7 @@ public class SkylarkRuleImplementationFunctionsTest extends SkylarkTestCase {
"main_rule(name='main')");
AssertionError expected =
- expectThrows(AssertionError.class,
- () -> getConfiguredTarget("//test:main"));
+ assertThrows(AssertionError.class, () -> getConfiguredTarget("//test:main"));
assertThat(expected).hasMessageThat()
.contains("invalid configuration fragment name 'notarealfragment'");
@@ -2114,8 +2113,7 @@ public class SkylarkRuleImplementationFunctionsTest extends SkylarkTestCase {
"main_rule(name='main')");
AssertionError expected =
- expectThrows(AssertionError.class,
- () -> getConfiguredTarget("//test:main"));
+ assertThrows(AssertionError.class, () -> getConfiguredTarget("//test:main"));
assertThat(expected).hasMessageThat()
.contains("has to declare 'apple' as a required fragment in target configuration");
@@ -2140,8 +2138,7 @@ public class SkylarkRuleImplementationFunctionsTest extends SkylarkTestCase {
"main_rule(name='main')");
AssertionError expected =
- expectThrows(AssertionError.class,
- () -> getConfiguredTarget("//test:main"));
+ assertThrows(AssertionError.class, () -> getConfiguredTarget("//test:main"));
assertThat(expected).hasMessageThat()
.contains("invalid configuration field name 'notarealfield' on fragment 'apple'");
@@ -2167,8 +2164,7 @@ public class SkylarkRuleImplementationFunctionsTest extends SkylarkTestCase {
"main_rule(name='main')");
AssertionError expected =
- expectThrows(AssertionError.class,
- () -> getConfiguredTarget("//test:main"));
+ assertThrows(AssertionError.class, () -> getConfiguredTarget("//test:main"));
assertThat(expected).hasMessageThat()
.contains("When an attribute value is a function, "
@@ -2195,8 +2191,7 @@ public class SkylarkRuleImplementationFunctionsTest extends SkylarkTestCase {
"main_rule(name='main')");
AssertionError expected =
- expectThrows(AssertionError.class,
- () -> getConfiguredTarget("//test:main"));
+ assertThrows(AssertionError.class, () -> getConfiguredTarget("//test:main"));
assertThat(expected).hasMessageThat()
.contains("argument 'default' has type 'SkylarkLateBoundDefault', but should be 'int'");