reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/unittests/Format/FormatTestJS.cpp
   69   verifyFormat("/* aaaaaaaaaaaaa */ aaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
  246   verifyFormat("a == = b;");
  247   verifyFormat("a != = b;");
  249   verifyFormat("a === b;");
  250   verifyFormat("aaaaaaa ===\n    b;", getGoogleJSStyleWithColumns(10));
  251   verifyFormat("a !== b;");
  252   verifyFormat("aaaaaaa !==\n    b;", getGoogleJSStyleWithColumns(10));
  253   verifyFormat("if (a + b + c +\n"
  259   verifyFormat("a >> >= b;");
  261   verifyFormat("a >>> b;");
  262   verifyFormat("aaaaaaa >>>\n    b;", getGoogleJSStyleWithColumns(10));
  263   verifyFormat("a >>>= b;");
  264   verifyFormat("aaaaaaa >>>=\n    b;", getGoogleJSStyleWithColumns(10));
  265   verifyFormat("if (a + b + c +\n"
  270   verifyFormat("var x = aaaaaaaaaa ?\n"
  275   verifyFormat("var b = a.map((x) => x + 1);");
  276   verifyFormat("return ('aaa') in bbbb;");
  277   verifyFormat("var x = aaaaaaaaaaaaaaaaaaaaaaaaa() in\n"
  281   verifyFormat("var x = aaaaaaaaaaaaaaaaaaaaaaaaa() in\n"
  285   verifyFormat("var x = aaaaaaaaaaaaaaaaaaaaaaaaa()\n"
  290   verifyFormat("someFunction(...a);");
  291   verifyFormat("var x = [1, ...a, 2];");
  295   verifyFormat("e && e.SomeFunction();");
  299   verifyFormat("not.and.or.not_eq = 1;");
  305   verifyFormat("x.class.struct = 1;");
  306   verifyFormat("x.case = 1;");
  307   verifyFormat("x.interface = 1;");
  308   verifyFormat("x.for = 1;");
  309   verifyFormat("x.of();");
  310   verifyFormat("of(null);");
  311   verifyFormat("return of(null);");
  312   verifyFormat("import {of} from 'x';");
  313   verifyFormat("x.in();");
  314   verifyFormat("x.let();");
  315   verifyFormat("x.var();");
  316   verifyFormat("x.for();");
  317   verifyFormat("x.as();");
  318   verifyFormat("x.instanceof();");
  319   verifyFormat("x.switch();");
  320   verifyFormat("x.case();");
  321   verifyFormat("x.delete();");
  322   verifyFormat("x.throw();");
  323   verifyFormat("x.throws();");
  324   verifyFormat("x.if();");
  325   verifyFormat("x = {\n"
  330   verifyFormat("var struct = 2;");
  331   verifyFormat("var union = 2;");
  332   verifyFormat("var interface = 2;");
  333   verifyFormat("interface = 2;");
  334   verifyFormat("x = interface instanceof y;");
  335   verifyFormat("interface Test {\n"
  349   verifyFormat(
  365   verifyFormat("throw (x + y);\n"
  375   verifyFormat("return operator && (aa);");
  377   verifyFormat("slots: Slot[];");
  381   verifyFormat("var [a, b, c] = [1, 2, 3];");
  382   verifyFormat("const [a, b, c] = [1, 2, 3];");
  383   verifyFormat("let [a, b, c] = [1, 2, 3];");
  384   verifyFormat("var {a, b} = {a: 1, b: 2};");
  385   verifyFormat("let {a, b} = {a: 1, b: 2};");
  389   verifyFormat("var x = {\n"
  394   verifyFormat("return {\n"
  399   verifyFormat("return {\n"
  405   verifyFormat("return {\n"
  414   verifyFormat("var stuff = {\n"
  422   verifyFormat("return {\n"
  427   verifyFormat("var obj = {\n"
  433   verifyFormat("var obj = {a: 123};");
  435   verifyFormat("X = {\n  a: 123\n};");
  436   verifyFormat("X.Y = {\n  a: 123\n};");
  438   verifyFormat("function x() {\n"
  441   verifyFormat("x = foo && {a: 123};");
  444   verifyFormat("var x = {\n"
  449   verifyFormat("var x = {y: (a) => a};");
  452   verifyFormat("var x = {\n"
  457   verifyFormat("var x = {\n"
  464   verifyFormat("var x = {[a]: 1, b: 2, [c]: 3};");
  465   verifyFormat("var x = {\n"
  472   verifyFormat("f({a}, () => {\n"
  477   verifyFormat("var x = {\n"
  484   verifyFormat("var x = {\n"
  489   verifyFormat("return {\n"
  497   verifyFormat("var o = {\n"
  503   verifyFormat("var o = {\n"
  509   verifyFormat("var o = {\n"
  515   verifyFormat("var o = {\n"
  527   verifyFormat("class X {\n"
  535   verifyFormat("class X {\n"
  545   verifyFormat("var arr = [1, 2, 3];");
  546   verifyFormat("f({a: 1, b: 2, c: 3});");
  548   verifyFormat("var object_literal_with_long_name = {\n"
  553   verifyFormat("f({a: 1, b: 2, c: 3});",
  555   verifyFormat("f({'a': [{}]});");
  559   verifyFormat("this.function('', true);");
  563   verifyFormat("goog.scope(function() {\n"
  567   verifyFormat("goog.scope(function() {\n"
  576   verifyFormat("(function() {\n"
  580   verifyFormat("(function() {\n"
  584   verifyFormat("(function() {\n"
  588   verifyFormat("(function() {\n"
  594   verifyFormat("goog.module('this.is.really.absurdly.long');",
  596   verifyFormat("goog.require('this.is.really.absurdly.long');",
  598   verifyFormat("goog.provide('this.is.really.absurdly.long');",
  600   verifyFormat("var long = goog.require('this.is.really.absurdly.long');",
  602   verifyFormat("const X = goog.requireType('this.is.really.absurdly.long');",
  604   verifyFormat("goog.forwardDeclare('this.is.really.absurdly.long');",
  608   verifyFormat(
  620   verifyFormat("namespace Foo {\n"
  623   verifyFormat("declare namespace Foo {\n"
  629   verifyFormat("declare namespace foobarbaz {\n"
  631   verifyFormat("declare module foobarbaz {\n"
  633   verifyFormat("namespace foobarbaz {\n"
  635   verifyFormat("module foobarbaz {\n"
  641   verifyFormat(
  645   verifyFormat(
  649   verifyFormat("declare function foo();\n"
  651   verifyFormat("declare function foo(): string;\n"
  653   verifyFormat("declare function foo(): {x: number};\n"
  655   verifyFormat("declare class X {}\n"
  657   verifyFormat("declare interface Y {}\n"
  659   verifyFormat(
  663   verifyFormat(
  670   verifyFormat("function outer1(a, b) {\n"
  682   verifyFormat("function f() {}");
  683   verifyFormat("function aFunction() {}\n"
  687   verifyFormat("function aFunction() {}\n"
  695   verifyFormat("function* f() {\n"
  702   verifyFormat("function*\n"
  706   verifyFormat("export function* f() {\n"
  709   verifyFormat("class X {\n"
  714   verifyFormat("var x = {\n"
  722   verifyFormat("async function f() {\n"
  740   verifyFormat("async function* f() {\n"
  743   verifyFormat("export async function f() {\n"
  746   verifyFormat("let x = async () => f();");
  747   verifyFormat("let x = async function() {\n"
  750   verifyFormat("let x = async();");
  751   verifyFormat("class X {\n"
  756   verifyFormat("function initialize() {\n"
  760   verifyFormat("for await (const x of y) {\n"
  763   verifyFormat("function asyncLoop() {\n"
  795   verifyFormat("var aaaaa: List<SomeThing> =\n"
  797   verifyFormat("return [\n"
  801   verifyFormat("return [\n"
  806   verifyFormat("var someVariable = SomeFunction([\n"
  810   verifyFormat("var someVariable = SomeFunction([\n"
  814   verifyFormat("var someVariable = SomeFunction(aaaa, [\n"
  818   verifyFormat("var someVariable = SomeFunction(\n"
  825   verifyFormat("var aaaa = aaaaa ||  // wrap\n"
  828   verifyFormat("someFunction([], {a: a});");
  830   verifyFormat("var string = [\n"
  837   verifyFormat("var array = [\n"
  841   verifyFormat("var array = someFunction([\n"
  850   verifyFormat("doFoo(function() {});");
  851   verifyFormat("doFoo(function() { return 1; });", Style);
  852   verifyFormat("var func = function() {\n"
  855   verifyFormat("var func =  //\n"
  859   verifyFormat("return {\n"
  867   verifyFormat("abc = xyz ? function() {\n"
  873   verifyFormat("var closure = goog.bind(\n"
  880   verifyFormat("var closure = goog.bind(function() {  // comment\n"
  884   verifyFormat("return {\n"
  892   verifyFormat("{\n"
  897   verifyFormat("someLooooooooongFunction(\n"
  904   verifyFormat("return {\n"
  910   verifyFormat("this.someObject.doSomething(aaaaaaaaaaaaaaaaaaaaaaaaaa)\n"
  916   verifyFormat("someFunction(goog.bind(function() {\n"
  924   verifyFormat("SomeFunction(function() {\n"
  929   verifyFormat("SomeFunction((function() {\n"
  935   verifyFormat("someFunction(function() {\n"
  943   verifyFormat("f({a: function() { return 1; }});", Style);
  945   verifyFormat("f({\n"
  953   verifyFormat("(aaaaaaaaaaaaaaaaaaaaa.getData as jasmine.Spy)\n"
  955   verifyFormat("(aaaaaaaaaaaaaaaaaaaaa.getData as jasmine.Spy)\n"
  957   verifyFormat("(aaaaaaaaaaaaaaaaaaaaa.getData as jasmine.Spy)\n"
  964   verifyFormat("var func = function() {\n"
  968   verifyFormat("var func = doSomething(function() { return 1; });", Style);
  969   verifyFormat("var outer = function() {\n"
  973   verifyFormat("function outer1(a, b) {\n"
  979   verifyFormat("var func = function() { return 1; };", Style);
  980   verifyFormat("var func = doSomething(function() { return 1; });", Style);
  981   verifyFormat(
  984   verifyFormat("function outer1(a, b) {\n"
  990   verifyFormat("var func = function() {\n"
  994   verifyFormat("var func = doSomething(function() {\n"
  998   verifyFormat("var outer = function() {\n"
 1004   verifyFormat("function outer1(a, b) {\n"
 1012   verifyFormat("var func = function() {\n"
 1021   verifyFormat("promise.then(\n"
 1031   verifyFormat("promise.then(\n"
 1041   verifyFormat("promise.then(\n"
 1052   verifyFormat("getSomeLongPromise()\n"
 1059   verifyFormat("getSomeLongPromise()\n"
 1069   verifyFormat("getSomeLongPromise()\n"
 1074   verifyFormat("return [aaaaaaaaaaaaaaaaaaaaaa]\n"
 1082   verifyFormat("var x = (a) => {\n"
 1085   verifyFormat("var x = (a) => {\n"
 1091   verifyFormat("var x = (a: type): {some: type} => {\n"
 1094   verifyFormat("var x = (a) => a;");
 1095   verifyFormat("return () => [];");
 1096   verifyFormat("var aaaaaaaaaaaaaaaaaaaa = {\n"
 1102   verifyFormat("var a = a.aaaaaaa(\n"
 1105   verifyFormat("var a = a.aaaaaaa(\n"
 1111   verifyFormat("someFunction(() => {\n"
 1117   verifyFormat("const f = (x: string|null): string|null => {\n"
 1123   verifyFormat("function() {\n"
 1129   verifyFormat("for (var i in [2, 3]) {\n"
 1131   verifyFormat("for (var i of [2, 3]) {\n"
 1133   verifyFormat("for (let {a, b} of x) {\n"
 1135   verifyFormat("for (let {a, b} of [x]) {\n"
 1137   verifyFormat("for (let [a, b] of [x]) {\n"
 1139   verifyFormat("for (let {a, b} in x) {\n"
 1147   verifyFormat("return aaaaa;", getGoogleJSStyleWithColumns(10));
 1148   verifyFormat("yield aaaaa;", getGoogleJSStyleWithColumns(10));
 1149   verifyFormat("return /* hello! */ aaaaa;", getGoogleJSStyleWithColumns(10));
 1150   verifyFormat("continue aaaaa;", getGoogleJSStyleWithColumns(10));
 1151   verifyFormat("continue /* hello! */ aaaaa;", getGoogleJSStyleWithColumns(10));
 1152   verifyFormat("break aaaaa;", getGoogleJSStyleWithColumns(10));
 1153   verifyFormat("throw aaaaa;", getGoogleJSStyleWithColumns(10));
 1154   verifyFormat("aaaaaaaaa++;", getGoogleJSStyleWithColumns(10));
 1155   verifyFormat("aaaaaaaaa--;", getGoogleJSStyleWithColumns(10));
 1156   verifyFormat("return [\n"
 1173   verifyFormat("async function\n"
 1176   verifyFormat("await theReckoning;", getGoogleJSStyleWithColumns(10));
 1177   verifyFormat("some['a']['b']", getGoogleJSStyleWithColumns(10));
 1178   verifyFormat("x = (a['a']\n"
 1181   verifyFormat("function f() {\n"
 1193   verifyFormat("Polymer({\n"
 1303   verifyFormat("var x = /** @type {foo} */ (bar);");
 1307   verifyFormat("try {\n"
 1316   verifyFormat("someObject.catch();");
 1317   verifyFormat("someObject.new();");
 1321   verifyFormat("var literal = 'hello ' +\n"
 1327   verifyFormat("var regex = /abc/;");
 1328   verifyFormat("f(/abc/);");
 1329   verifyFormat("f(abc, /abc/);");
 1330   verifyFormat("some_map[/abc/];");
 1331   verifyFormat("var x = a ? /abc/ : /abc/;");
 1332   verifyFormat("for (var i = 0; /abc/.test(s[i]); i++) {\n}");
 1333   verifyFormat("var x = !/abc/.test(y);");
 1334   verifyFormat("var x = foo()! / 10;");
 1335   verifyFormat("var x = a && /abc/.test(y);");
 1336   verifyFormat("var x = a || /abc/.test(y);");
 1337   verifyFormat("var x = a + /abc/.search(y);");
 1338   verifyFormat("/abc/.search(y);");
 1339   verifyFormat("var regexs = {/abc/, /abc/};");
 1340   verifyFormat("return /abc/;");
 1343   verifyFormat("var a = a / 2 + b / 3;");
 1344   verifyFormat("var a = a++ / 2;");
 1346   verifyFormat("var a = ++/a/;");
 1350   verifyFormat("if (foo) / bar /.exec(baz);");
 1354   verifyFormat("var regex = /=/;");
 1355   verifyFormat("var regex = /a*/;");
 1356   verifyFormat("var regex = /a+/;");
 1357   verifyFormat("var regex = /a?/;");
 1358   verifyFormat("var regex = /.a./;");
 1359   verifyFormat("var regex = /a\\*/;");
 1360   verifyFormat("var regex = /^a$/;");
 1361   verifyFormat("var regex = /\\/a/;");
 1362   verifyFormat("var regex = /(?:x)/;");
 1363   verifyFormat("var regex = /x(?=y)/;");
 1364   verifyFormat("var regex = /x(?!y)/;");
 1365   verifyFormat("var regex = /x|y/;");
 1366   verifyFormat("var regex = /a{2}/;");
 1367   verifyFormat("var regex = /a{1,3}/;");
 1369   verifyFormat("var regex = /[abc]/;");
 1370   verifyFormat("var regex = /[^abc]/;");
 1371   verifyFormat("var regex = /[\\b]/;");
 1372   verifyFormat("var regex = /[/]/;");
 1373   verifyFormat("var regex = /[\\/]/;");
 1374   verifyFormat("var regex = /\\[/;");
 1375   verifyFormat("var regex = /\\\\[/]/;");
 1376   verifyFormat("var regex = /}[\"]/;");
 1377   verifyFormat("var regex = /}[/\"]/;");
 1378   verifyFormat("var regex = /}[\"/]/;");
 1380   verifyFormat("var regex = /\\b/;");
 1381   verifyFormat("var regex = /\\B/;");
 1382   verifyFormat("var regex = /\\d/;");
 1383   verifyFormat("var regex = /\\D/;");
 1384   verifyFormat("var regex = /\\f/;");
 1385   verifyFormat("var regex = /\\n/;");
 1386   verifyFormat("var regex = /\\r/;");
 1387   verifyFormat("var regex = /\\s/;");
 1388   verifyFormat("var regex = /\\S/;");
 1389   verifyFormat("var regex = /\\t/;");
 1390   verifyFormat("var regex = /\\v/;");
 1391   verifyFormat("var regex = /\\w/;");
 1392   verifyFormat("var regex = /\\W/;");
 1393   verifyFormat("var regex = /a(a)\\1/;");
 1394   verifyFormat("var regex = /\\0/;");
 1395   verifyFormat("var regex = /\\\\/g;");
 1396   verifyFormat("var regex = /\\a\\\\/g;");
 1397   verifyFormat("var regex = /\a\\//g;");
 1398   verifyFormat("var regex = /a\\//;\n"
 1407   verifyFormat("var regex = /\"/;", getGoogleJSStyleWithColumns(16));
 1408   verifyFormat("var regex =\n"
 1411   verifyFormat("var regex =  //\n"
 1413   verifyFormat("var regexs = [\n"
 1420   verifyFormat("var regex = /abc/g;");
 1421   verifyFormat("var regex = /abc/i;");
 1422   verifyFormat("var regex = /abc/m;");
 1423   verifyFormat("var regex = /abc/y;");
 1427   verifyFormat("var regex = /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;",
 1429   verifyFormat("var regex =\n"
 1432   verifyFormat("var regex = /\\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;",
 1437   verifyFormat("var regex = search.match(/(?:\?|&)times=([^?&]+)/i);");
 1450   verifyFormat("var x: string;");
 1451   verifyFormat("var x: {a: string; b: number;} = {};");
 1452   verifyFormat("function x(): string {\n  return 'x';\n}");
 1453   verifyFormat("function x(): {x: string} {\n  return {x: 'x'};\n}");
 1454   verifyFormat("function x(y: string): string {\n  return 'x';\n}");
 1455   verifyFormat("for (var y: string in x) {\n  x();\n}");
 1456   verifyFormat("for (var y: string of x) {\n  x();\n}");
 1457   verifyFormat("function x(y: {a?: number;} = {}): number {\n"
 1460   verifyFormat("const x: Array<{a: number; b: string;}> = [];");
 1461   verifyFormat("((a: string, b: number): string => a + b);");
 1462   verifyFormat("var x: (y: number) => string;");
 1463   verifyFormat("var x: P<string, (a: number) => string>;");
 1464   verifyFormat("var x = {\n"
 1469   verifyFormat("var x = {\n"
 1474   verifyFormat("function someFunc(args: string[]):\n"
 1477   verifyFormat(
 1480   verifyFormat("const xIsALongIdent:\n""    YJustBarelyFitsLinex[];",
 1482   verifyFormat("const x = {\n"
 1488   verifyFormat("let x: A|B = A | B;");
 1489   verifyFormat("let x: A&B|C = A & B;");
 1490   verifyFormat("let x: Foo<A|B> = new Foo<A|B>();");
 1491   verifyFormat("function(x: A|B): C&D {}");
 1492   verifyFormat("function(x: A|B = A | B): C&D {}");
 1493   verifyFormat("function x(path: number|string) {}");
 1494   verifyFormat("function x(): string|number {}");
 1495   verifyFormat("type Foo = Bar|Baz;");
 1496   verifyFormat("type Foo = Bar<X>|Baz;");
 1497   verifyFormat("type Foo = (Bar<X>|Baz);");
 1498   verifyFormat("let x: Bar|Baz;");
 1499   verifyFormat("let x: Bar<X>|Baz;");
 1500   verifyFormat("let x: (Foo|Bar)[];");
 1501   verifyFormat("type X = {\n"
 1504   verifyFormat("export type X = {\n"
 1510   verifyFormat("let x: {x: number|null} = {x: number | null};");
 1511   verifyFormat("let nested: {x: {y: number|null}};");
 1512   verifyFormat("let mixed: {x: [number|null, {w: number}]};");
 1513   verifyFormat("class X {\n"
 1522   verifyFormat("class C {\n  x: string = 12;\n}");
 1523   verifyFormat("class C {\n  x(): string => 12;\n}");
 1524   verifyFormat("class C {\n  ['x' + 2]: string = 12;\n}");
 1525   verifyFormat("class C {\n"
 1529   verifyFormat("class C {\n  private x: string = 12;\n}");
 1530   verifyFormat("class C {\n  private static x: string = 12;\n}");
 1531   verifyFormat("class C {\n  static x(): string {\n    return 'asd';\n  }\n}");
 1532   verifyFormat("class C extends P implements I {}");
 1533   verifyFormat("class C extends p.P implements i.I {}");
 1534   verifyFormat(
 1538   verifyFormat("class Test {\n"
 1542   verifyFormat("foo = class Name {\n"
 1545   verifyFormat("foo = class {\n"
 1548   verifyFormat("class C {\n"
 1554   verifyFormat("class X {\n"
 1561   verifyFormat("@Component({\n"
 1570   verifyFormat("class X {\n"
 1578   verifyFormat("interface I {\n"
 1585   verifyFormat("interface a {}\n"
 1590   verifyFormat("interface I {\n"
 1596   verifyFormat("class C extends {} {}");
 1597   verifyFormat("class C implements {bar: number} {}");
 1599   verifyFormat("class C implements {\n"
 1603   verifyFormat("class C<P extends {}> {}");
 1607   verifyFormat("enum Foo {\n"
 1611   verifyFormat("export /* somecomment*/ enum Foo {\n"
 1615   verifyFormat("enum Foo {\n"
 1620   verifyFormat("const enum Foo {\n"
 1624   verifyFormat("export const enum Foo {\n"
 1631   verifyFormat("@A\nclass C {\n}");
 1632   verifyFormat("@A({arg: 'value'})\nclass C {\n}");
 1633   verifyFormat("@A\n@B\nclass C {\n}");
 1634   verifyFormat("class C {\n  @A x: string;\n}");
 1635   verifyFormat("class C {\n"
 1641   verifyFormat("class C {\n"
 1644   verifyFormat("class X {}\n"
 1646   verifyFormat("class X {\n"
 1652   verifyFormat("type X = number;\n"
 1654   verifyFormat("type X<Y> = Z<Y>;");
 1655   verifyFormat("type X = {\n"
 1659   verifyFormat("export type X = {\n"
 1691   verifyFormat("import SomeThing from 'some/module.js';");
 1692   verifyFormat("import {X, Y} from 'some/module.js';");
 1693   verifyFormat("import a, {X, Y} from 'some/module.js';");
 1694   verifyFormat("import {X, Y,} from 'some/module.js';");
 1695   verifyFormat("import {X as myLocalX, Y as myLocalY} from 'some/module.js';");
 1699   verifyFormat("import * as lib from 'some/module.js';");
 1700   verifyFormat("var x = {import: 1};\nx.import = 2;");
 1702   verifyFormat("export function fn() {\n"
 1705   verifyFormat("export function A() {}\n"
 1708   verifyFormat("export default () => {\n"
 1712   verifyFormat("export const x = 12;");
 1713   verifyFormat("export default class X {}");
 1714   verifyFormat("export {X, Y} from 'some/module.js';");
 1715   verifyFormat("export {X, Y,} from 'some/module.js';");
 1716   verifyFormat("export {SomeVeryLongExport as X, "
 1719   verifyFormat("export let someRatherLongVariableName =\n"
 1722   verifyFormat("export {\n"
 1728   verifyFormat("export class C {\n"
 1732   verifyFormat("export class X {\n"
 1735   verifyFormat("export abstract class X {\n"
 1738   verifyFormat("export default class X {\n"
 1741   verifyFormat("export default function() {\n  return 1;\n}");
 1742   verifyFormat("export var x = 12;");
 1743   verifyFormat("class C {}\n"
 1746   verifyFormat("export var x: number = 12;");
 1747   verifyFormat("export const y = {\n"
 1751   verifyFormat("export enum Foo {\n"
 1756   verifyFormat("export default [\n"
 1760   verifyFormat("export default [];");
 1761   verifyFormat("export default () => {};");
 1762   verifyFormat("export interface Foo {\n"
 1773   verifyFormat("import {VeryLongImportsAreAnnoying, VeryLongImportsAreAnnoying,"
 1778   verifyFormat("import {\n"
 1784   verifyFormat("import {\n"
 1789   verifyFormat("export {\n"
 1816   verifyFormat("var x =\n"
 1819   verifyFormat("var x = `hello ${world}` >= some();",
 1821   verifyFormat("var x = `hellö ${wörld}` >= söme();",
 1837   verifyFormat("var x =\n"
 1842   verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
 1854   verifyFormat(
 1859   verifyFormat("var x = `hello` == `hello`;");
 1871   verifyFormat("var x = `'`;  // comment with matching quote '\n"
 1873   verifyFormat("var x = `\"`;  // comment with matching quote \"\n"
 1895   verifyFormat("var x = ` \\${foo}`;\n");
 1899   verifyFormat("var f = `aaaa ${a ? 'a' : 'b'}`;");
 1907   verifyFormat("var x = someFunction(`${})`)  //\n"
 1909   verifyFormat("var x = someFunction(`${aaaa}${\n"
 1957   verifyFormat(
 1959   verifyFormat("var x = `he${({text: 'll'}.text)}o`;");
 1962   verifyFormat("}");
 1966   verifyFormat("var x = html`<ul>`;");
 1967   verifyFormat("yield `hello`;");
 1977   verifyFormat("var x = <type>foo;");
 1978   verifyFormat("var x = foo as type;");
 1979   verifyFormat("let x = (a + b) as\n"
 1982   verifyFormat("foo = <Bar[]>[\n"
 1986   verifyFormat("var x = [{x: 1} as type];");
 1987   verifyFormat("x = x as [a, b];");
 1988   verifyFormat("x = x as {a: string};");
 1989   verifyFormat("x = x as (string);");
 1990   verifyFormat("x = x! as (string);");
 1991   verifyFormat("x = y! in z;");
 1992   verifyFormat("var x = something.someFunction() as\n"
 1998   verifyFormat("class X<Y> {}");
 1999   verifyFormat("new X<Y>();");
 2000   verifyFormat("foo<Y>(a);");
 2001   verifyFormat("var x: X<Y>[];");
 2002   verifyFormat("class C extends D<E> implements F<G>, H<I> {}");
 2003   verifyFormat("function f(a: List<any> = null) {}");
 2004   verifyFormat("function f(): List<any> {}");
 2005   verifyFormat("function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa():\n"
 2007   verifyFormat("function aaaaaaaaaa(\n"
 2014   verifyFormat(
 2022   verifyFormat("function x(a?: b, c?, d?) {}");
 2023   verifyFormat("class X {\n"
 2027   verifyFormat("interface X {\n"
 2030   verifyFormat("constructor({aa}: {\n"
 2039   verifyFormat("var x: {[k: string]: v};");
 2043   verifyFormat("xxxxxxxxxxx(\n"
 2046   verifyFormat("xxxxxxxxxxx(\n"
 2050   verifyFormat("xxxxxxxxxxx(\n"
 2056   verifyFormat("while (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&\n"
 2182   verifyFormat("var x = \"foo\";", DoubleQuotes);
 2190   verifyFormat("var x = \"foo\";", LeaveQuotes);
 2191   verifyFormat("var x = 'foo';", LeaveQuotes);
 2202   verifyFormat("let x = foo!.bar();\n");
 2203   verifyFormat("let x = foo ? bar! : baz;\n");
 2204   verifyFormat("let x = !foo;\n");
 2205   verifyFormat("if (!+a) {\n}");
 2206   verifyFormat("let x = foo[0]!;\n");
 2207   verifyFormat("let x = (foo)!;\n");
 2208   verifyFormat("let x = x(foo!);\n");
 2209   verifyFormat(
 2213   verifyFormat("let x = foo! - 1;\n");
 2214   verifyFormat("let x = {foo: 1}!;\n");
 2215   verifyFormat(
 2221   verifyFormat("let x = namespace!;\n");
 2222   verifyFormat("return !!x;\n");
 2226   verifyFormat("y = x ? 1 : 2;");
 2227   verifyFormat("x ? 1 : 2;");
 2228   verifyFormat("class Foo {\n"
 2235   verifyFormat("import {x} from 'x';  // from some location",
 2237   verifyFormat("// taze: x from 'location'", getGoogleJSStyleWithColumns(10));
 2238   verifyFormat("/// <reference path=\"some/location\" />", getGoogleJSStyleWithColumns(10));
 2242   verifyFormat("squared = x ** 2;");
 2243   verifyFormat("squared **= 2;");
 2249   verifyFormat("var l = [\n"
 2254   verifyFormat("var l = [\n"
 2259   verifyFormat("someFunction(\n"
 2265   verifyFormat("someFunction(\n"
 2271   verifyFormat("var o = {\n"
 2277   verifyFormat("var o = {\n"
 2328   verifyFormat("callFoo(/*spaceAfterParameterNamingComment=*/ 1);");
 2334   verifyFormat( // wrap
 2341   verifyFormat("class Example {\n"