Skip to content

Commit 7e64ae9

Browse files
committed
Format with google-java-format
1 parent 274107b commit 7e64ae9

1 file changed

Lines changed: 10 additions & 31 deletions

File tree

test/com/google/javascript/jscomp/TypeCheckTest.java

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23785,14 +23785,9 @@ public void testUnknownTypeReport() {
2378523785

2378623786
@Test
2378723787
public void testInferredType_unionReceiverSliceCall() {
23788+
assertUnionMethodCallType("!Array<number>|string", ".slice(0, 3)", "!Array<number>|string");
2378823789
assertUnionMethodCallType(
23789-
"!Array<number>|string",
23790-
".slice(0, 3)",
23791-
"!Array<number>|string");
23792-
assertUnionMethodCallType(
23793-
"!Array<number>|!ArrayBuffer",
23794-
".slice(0, 3)",
23795-
"!Array<number>|!ArrayBuffer");
23790+
"!Array<number>|!ArrayBuffer", ".slice(0, 3)", "!Array<number>|!ArrayBuffer");
2379623791
assertUnionMethodCallType(
2379723792
"!Array<number>|!ArrayBuffer|!Uint8Array",
2379823793
".slice(0, 3)",
@@ -23802,37 +23797,20 @@ public void testInferredType_unionReceiverSliceCall() {
2380223797
@Test
2380323798
public void testInferredType_unionReceiverIncludesCall() {
2380423799
assertUnionMethodCallType(
23805-
"!Array<string>|string|!ReadonlyArray<string>",
23806-
".includes('a')",
23807-
"boolean");
23808-
assertUnionMethodCallType(
23809-
"!Array<number>|!Uint8Array",
23810-
".includes(3)",
23811-
"boolean");
23800+
"!Array<string>|string|!ReadonlyArray<string>", ".includes('a')", "boolean");
23801+
assertUnionMethodCallType("!Array<number>|!Uint8Array", ".includes(3)", "boolean");
2381223802
}
2381323803

2381423804
@Test
2381523805
public void testInferredType_unionReceiverIndexOfCall() {
23816-
assertUnionMethodCallType(
23817-
"!Array<string>|string",
23818-
".indexOf('a')",
23819-
"number");
23820-
assertUnionMethodCallType(
23821-
"!Array<number>|!Uint8Array",
23822-
".indexOf(3)",
23823-
"number");
23806+
assertUnionMethodCallType("!Array<string>|string", ".indexOf('a')", "number");
23807+
assertUnionMethodCallType("!Array<number>|!Uint8Array", ".indexOf(3)", "number");
2382423808
}
2382523809

2382623810
@Test
2382723811
public void testInferredType_unionReceiverToStringCall() {
23828-
assertUnionMethodCallType(
23829-
"number|bigint",
23830-
".toString()",
23831-
"string");
23832-
assertUnionMethodCallType(
23833-
"bigint|number",
23834-
".toString(36)",
23835-
"string");
23812+
assertUnionMethodCallType("number|bigint", ".toString()", "string");
23813+
assertUnionMethodCallType("bigint|number", ".toString(36)", "string");
2383623814
}
2383723815

2383823816
@Test
@@ -23850,7 +23828,8 @@ private void assertUnionMethodCallType(
2385023828
function callMethodOf(x) {
2385123829
return x%s;
2385223830
}
23853-
""".formatted(receiverType, methodCall));
23831+
"""
23832+
.formatted(receiverType, methodCall));
2385423833

2385523834
Node functionNode = root.getFirstChild();
2385623835
assertNode(functionNode).hasToken(Token.FUNCTION);

0 commit comments

Comments
 (0)