aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
diff options
context:
space:
mode:
authorGravatar laurentlb <laurentlb@google.com>2017-07-07 06:58:45 -0400
committerGravatar John Cater <jcater@google.com>2017-07-07 07:09:05 -0400
commit9e54088754a8fbe1b73c02e7e25e8f46c44bc7d5 (patch)
treee6b2f59bb776a534c5e31908c21b5665f0a6bfea /src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
parent12a6a7a7536b063f923d53eb9f6c244849b69fc5 (diff)
Improve error message when calling a builtin function with wrong type
Error message is simpler and doesn't show the type of all arguments. RELNOTES: None. PiperOrigin-RevId: 161187134
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
index 1f77337ff2..6e4a576671 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
@@ -337,9 +337,8 @@ public class SkylarkIntegrationTest extends BuildViewTestCase {
"str",
"\t\tstr.index(1)"
+ System.lineSeparator()
- + "method string.index(sub: string, start: int, end: int or NoneType) is not "
- + "applicable for arguments (int, int, NoneType): 'sub' is 'int', "
- + "but should be 'string'");
+ + "argument 'sub' has type 'int', but should be 'string'\n"
+ + "in call to builtin method string.index(sub, start, end)");
}
@Test