• Home
  • Raw
  • Download

Lines Matching refs:verifyFormat

49   static void verifyFormat(  in verifyFormat()  function in clang::format::FormatTestJS
56 static void verifyFormat( in verifyFormat() function in clang::format::FormatTestJS
66 verifyFormat("/* aaaaaaaaaaaaa */ aaaaaaaaaaaaaaaaaaaaaaaaaaa(\n" in TEST_F()
71 verifyFormat("a == = b;"); in TEST_F()
72 verifyFormat("a != = b;"); in TEST_F()
74 verifyFormat("a === b;"); in TEST_F()
75 verifyFormat("aaaaaaa ===\n b;", getGoogleJSStyleWithColumns(10)); in TEST_F()
76 verifyFormat("a !== b;"); in TEST_F()
77 verifyFormat("aaaaaaa !==\n b;", getGoogleJSStyleWithColumns(10)); in TEST_F()
78 verifyFormat("if (a + b + c +\n" in TEST_F()
84 verifyFormat("a >> >= b;"); in TEST_F()
86 verifyFormat("a >>> b;"); in TEST_F()
87 verifyFormat("aaaaaaa >>>\n b;", getGoogleJSStyleWithColumns(10)); in TEST_F()
88 verifyFormat("a >>>= b;"); in TEST_F()
89 verifyFormat("aaaaaaa >>>=\n b;", getGoogleJSStyleWithColumns(10)); in TEST_F()
90 verifyFormat("if (a + b + c +\n" in TEST_F()
95 verifyFormat("var x = aaaaaaaaaa ?\n" in TEST_F()
100 verifyFormat("var b = a.map((x) => x + 1);"); in TEST_F()
101 verifyFormat("return ('aaa') in bbbb;"); in TEST_F()
102 verifyFormat("var x = aaaaaaaaaaaaaaaaaaaaaaaaa() in\n" in TEST_F()
106 verifyFormat("var x = aaaaaaaaaaaaaaaaaaaaaaaaa() in\n" in TEST_F()
110 verifyFormat("var x = aaaaaaaaaaaaaaaaaaaaaaaaa()\n" in TEST_F()
115 verifyFormat("someFunction(...a);"); in TEST_F()
116 verifyFormat("var x = [1, ...a, 2];"); in TEST_F()
120 verifyFormat("e && e.SomeFunction();"); in TEST_F()
124 verifyFormat("not.and.or.not_eq = 1;"); in TEST_F()
130 verifyFormat("x.class.struct = 1;"); in TEST_F()
131 verifyFormat("x.case = 1;"); in TEST_F()
132 verifyFormat("x.interface = 1;"); in TEST_F()
133 verifyFormat("x.for = 1;"); in TEST_F()
134 verifyFormat("x.of() = 1;"); in TEST_F()
135 verifyFormat("x.in() = 1;"); in TEST_F()
136 verifyFormat("x.let() = 1;"); in TEST_F()
137 verifyFormat("x.var() = 1;"); in TEST_F()
138 verifyFormat("x = {\n" in TEST_F()
143 verifyFormat("var struct = 2;"); in TEST_F()
144 verifyFormat("var union = 2;"); in TEST_F()
145 verifyFormat("var interface = 2;"); in TEST_F()
146 verifyFormat("interface = 2;"); in TEST_F()
147 verifyFormat("x = interface instanceof y;"); in TEST_F()
152 verifyFormat("return operator && (aa);"); in TEST_F()
156 verifyFormat("var [a, b, c] = [1, 2, 3];"); in TEST_F()
157 verifyFormat("const [a, b, c] = [1, 2, 3];"); in TEST_F()
158 verifyFormat("let [a, b, c] = [1, 2, 3];"); in TEST_F()
159 verifyFormat("var {a, b} = {a: 1, b: 2};"); in TEST_F()
160 verifyFormat("let {a, b} = {a: 1, b: 2};"); in TEST_F()
164 verifyFormat("var x = {y: function(a) { return a; }};"); in TEST_F()
165 verifyFormat("return {\n" in TEST_F()
170 verifyFormat("return {\n" in TEST_F()
176 verifyFormat("return {\n" in TEST_F()
185 verifyFormat("var stuff = {\n" in TEST_F()
193 verifyFormat("return {\n" in TEST_F()
198 verifyFormat("var obj = {\n" in TEST_F()
204 verifyFormat("var obj = {a: 123};"); in TEST_F()
206 verifyFormat("X = {\n a: 123\n};"); in TEST_F()
207 verifyFormat("X.Y = {\n a: 123\n};"); in TEST_F()
209 verifyFormat("function x() {\n" in TEST_F()
212 verifyFormat("x = foo && {a: 123};"); in TEST_F()
215 verifyFormat("var x = {y: (a) => { return a; }};"); in TEST_F()
216 verifyFormat("var x = {y: (a) => a};"); in TEST_F()
219 verifyFormat("var x = {[a]: 1, b: 2, [c]: 3};"); in TEST_F()
220 verifyFormat("var x = {\n" in TEST_F()
227 verifyFormat("f({a}, () => {\n" in TEST_F()
232 verifyFormat("var x = {\n" in TEST_F()
240 verifyFormat("var o = {\n" in TEST_F()
246 verifyFormat("var o = {\n" in TEST_F()
252 verifyFormat("var o = {\n" in TEST_F()
258 verifyFormat("var o = {\n" in TEST_F()
269 verifyFormat("var arr = [1, 2, 3];"); in TEST_F()
270 verifyFormat("f({a: 1, b: 2, c: 3});"); in TEST_F()
272 verifyFormat("var object_literal_with_long_name = {\n" in TEST_F()
277 verifyFormat("f({a: 1, b: 2, c: 3});", in TEST_F()
279 verifyFormat("f({'a': [{}]});"); in TEST_F()
283 verifyFormat("this.function('', true);"); in TEST_F()
287 verifyFormat("goog.scope(function() {\n" in TEST_F()
291 verifyFormat("goog.scope(function() {\n" in TEST_F()
299 verifyFormat("goog.module('this.is.really.absurdly.long');", in TEST_F()
301 verifyFormat("goog.require('this.is.really.absurdly.long');", in TEST_F()
303 verifyFormat("goog.provide('this.is.really.absurdly.long');", in TEST_F()
305 verifyFormat("var long = goog.require('this.is.really.absurdly.long');", in TEST_F()
307 verifyFormat("goog.setTestOnly('this.is.really.absurdly.long');", in TEST_F()
309 verifyFormat("goog.forwardDeclare('this.is.really.absurdly.long');", in TEST_F()
313 verifyFormat( in TEST_F()
319 verifyFormat("namespace Foo {\n" in TEST_F()
322 verifyFormat("declare namespace Foo {\n" in TEST_F()
328 verifyFormat("function outer1(a, b) {\n" in TEST_F()
336 verifyFormat("function f() {}"); in TEST_F()
340 verifyFormat("function* f() {\n" in TEST_F()
345 verifyFormat("function*\n" in TEST_F()
349 verifyFormat("export function* f() {\n" in TEST_F()
352 verifyFormat("class X {\n" in TEST_F()
358 verifyFormat("async function f() {\n" in TEST_F()
362 verifyFormat("async function* f() {\n" in TEST_F()
365 verifyFormat("export async function f() {\n" in TEST_F()
368 verifyFormat("class X {\n" in TEST_F()
371 verifyFormat("function initialize() {\n" in TEST_F()
378 verifyFormat("var aaaaa: List<SomeThing> =\n" in TEST_F()
380 verifyFormat("return [\n" in TEST_F()
384 verifyFormat("return [\n" in TEST_F()
389 verifyFormat("var someVariable = SomeFunction([\n" in TEST_F()
393 verifyFormat("var someVariable = SomeFunction([\n" in TEST_F()
397 verifyFormat("var someVariable = SomeFunction(aaaa, [\n" in TEST_F()
401 verifyFormat("var someVariable = SomeFunction(\n" in TEST_F()
408 verifyFormat("var aaaa = aaaaa || // wrap\n" in TEST_F()
411 verifyFormat("someFunction([], {a: a});"); in TEST_F()
415 verifyFormat("var array = [\n" in TEST_F()
419 verifyFormat("var array = someFunction([\n" in TEST_F()
426 verifyFormat("doFoo(function() {});"); in TEST_F()
427 verifyFormat("doFoo(function() { return 1; });"); in TEST_F()
428 verifyFormat("var func = function() {\n" in TEST_F()
431 verifyFormat("var func = //\n" in TEST_F()
435 verifyFormat("return {\n" in TEST_F()
442 verifyFormat("abc = xyz ? function() {\n" in TEST_F()
448 verifyFormat("var closure = goog.bind(\n" in TEST_F()
455 verifyFormat("var closure = goog.bind(function() { // comment\n" in TEST_F()
459 verifyFormat("return {\n" in TEST_F()
467 verifyFormat("{\n" in TEST_F()
472 verifyFormat("someLooooooooongFunction(\n" in TEST_F()
479 verifyFormat("f({a: function() { return 1; }});", in TEST_F()
481 verifyFormat("f({\n" in TEST_F()
486 verifyFormat("return {\n" in TEST_F()
492 verifyFormat("this.someObject.doSomething(aaaaaaaaaaaaaaaaaaaaaaaaaa)\n" in TEST_F()
498 verifyFormat("someFunction(goog.bind(function() {\n" in TEST_F()
507 verifyFormat("someFunction(function() {\n" in TEST_F()
518 verifyFormat("var func = function() {\n" in TEST_F()
522 verifyFormat("var func = doSomething(function() { return 1; });", Style); in TEST_F()
523 verifyFormat("var outer = function() {\n" in TEST_F()
527 verifyFormat("function outer1(a, b) {\n" in TEST_F()
533 verifyFormat("var func = function() { return 1; };", Style); in TEST_F()
534 verifyFormat("var func = doSomething(function() { return 1; });", Style); in TEST_F()
535 verifyFormat( in TEST_F()
538 verifyFormat("function outer1(a, b) {\n" in TEST_F()
544 verifyFormat("var func = function() {\n" in TEST_F()
548 verifyFormat("var func = doSomething(function() {\n" in TEST_F()
552 verifyFormat("var outer = function() {\n" in TEST_F()
558 verifyFormat("function outer1(a, b) {\n" in TEST_F()
566 verifyFormat("var func = function() {\n" in TEST_F()
573 verifyFormat("promise.then(\n" in TEST_F()
583 verifyFormat("promise.then(\n" in TEST_F()
593 verifyFormat("promise.then(\n" in TEST_F()
604 verifyFormat("getSomeLongPromise()\n" in TEST_F()
610 verifyFormat("getSomeLongPromise()\n" in TEST_F()
620 verifyFormat("getSomeLongPromise()\n" in TEST_F()
624 verifyFormat("return [aaaaaaaaaaaaaaaaaaaaaa]\n" in TEST_F()
632 verifyFormat("var x = (a) => {\n" in TEST_F()
635 verifyFormat("var x = (a) => {\n" in TEST_F()
639 verifyFormat("var x = (a: type): {some: type} => {\n" in TEST_F()
642 verifyFormat("var x = (a) => a;"); in TEST_F()
643 verifyFormat("return () => [];"); in TEST_F()
644 verifyFormat("var aaaaaaaaaaaaaaaaaaaa = {\n" in TEST_F()
650 verifyFormat("var a = a.aaaaaaa(\n" in TEST_F()
653 verifyFormat("var a = a.aaaaaaa(\n" in TEST_F()
659 verifyFormat("someFunction(() => {\n" in TEST_F()
668 verifyFormat("function() {\n" in TEST_F()
674 verifyFormat("for (var i in [2, 3]) {\n" in TEST_F()
676 verifyFormat("for (var i of [2, 3]) {\n" in TEST_F()
678 verifyFormat("for (let {a, b} of x) {\n" in TEST_F()
680 verifyFormat("for (let {a, b} in x) {\n" in TEST_F()
688 verifyFormat("return aaaaa;", getGoogleJSStyleWithColumns(10)); in TEST_F()
689 verifyFormat("continue aaaaa;", getGoogleJSStyleWithColumns(10)); in TEST_F()
690 verifyFormat("break aaaaa;", getGoogleJSStyleWithColumns(10)); in TEST_F()
691 verifyFormat("throw aaaaa;", getGoogleJSStyleWithColumns(10)); in TEST_F()
692 verifyFormat("aaaaaaaaa++;", getGoogleJSStyleWithColumns(10)); in TEST_F()
693 verifyFormat("aaaaaaaaa--;", getGoogleJSStyleWithColumns(10)); in TEST_F()
694 verifyFormat("return [\n" in TEST_F()
701 verifyFormat("a\n" in TEST_F()
705 verifyFormat("a()\n" in TEST_F()
709 verifyFormat("a[b]\n" in TEST_F()
713 verifyFormat("1\n" in TEST_F()
717 verifyFormat("a\n" in TEST_F()
721 verifyFormat("a\n" in TEST_F()
725 verifyFormat("a++\n" in TEST_F()
729 verifyFormat("a\n" in TEST_F()
733 verifyFormat("a\n" in TEST_F()
737 verifyFormat("a\n" in TEST_F()
741 verifyFormat("var a", "var\n" in TEST_F()
743 verifyFormat("x instanceof String", "x\n" in TEST_F()
746 verifyFormat("function f(@Foo bar) {}", "function f(@Foo\n" in TEST_F()
751 verifyFormat("var x = /** @type {foo} */ (bar);"); in TEST_F()
755 verifyFormat("try {\n" in TEST_F()
764 verifyFormat("someObject.catch();"); in TEST_F()
765 verifyFormat("someObject.new();"); in TEST_F()
766 verifyFormat("someObject.delete();"); in TEST_F()
770 verifyFormat("var literal = 'hello ' +\n" in TEST_F()
776 verifyFormat("var regex = /abc/;"); in TEST_F()
777 verifyFormat("f(/abc/);"); in TEST_F()
778 verifyFormat("f(abc, /abc/);"); in TEST_F()
779 verifyFormat("some_map[/abc/];"); in TEST_F()
780 verifyFormat("var x = a ? /abc/ : /abc/;"); in TEST_F()
781 verifyFormat("for (var i = 0; /abc/.test(s[i]); i++) {\n}"); in TEST_F()
782 verifyFormat("var x = !/abc/.test(y);"); in TEST_F()
783 verifyFormat("var x = a && /abc/.test(y);"); in TEST_F()
784 verifyFormat("var x = a || /abc/.test(y);"); in TEST_F()
785 verifyFormat("var x = a + /abc/.search(y);"); in TEST_F()
786 verifyFormat("/abc/.search(y);"); in TEST_F()
787 verifyFormat("var regexs = {/abc/, /abc/};"); in TEST_F()
788 verifyFormat("return /abc/;"); in TEST_F()
791 verifyFormat("var a = a / 2 + b / 3;"); in TEST_F()
792 verifyFormat("var a = a++ / 2;"); in TEST_F()
794 verifyFormat("var a = ++/a/;"); in TEST_F()
798 verifyFormat("if (foo) / bar /.exec(baz);"); in TEST_F()
802 verifyFormat("var regex = /=/;"); in TEST_F()
803 verifyFormat("var regex = /a*/;"); in TEST_F()
804 verifyFormat("var regex = /a+/;"); in TEST_F()
805 verifyFormat("var regex = /a?/;"); in TEST_F()
806 verifyFormat("var regex = /.a./;"); in TEST_F()
807 verifyFormat("var regex = /a\\*/;"); in TEST_F()
808 verifyFormat("var regex = /^a$/;"); in TEST_F()
809 verifyFormat("var regex = /\\/a/;"); in TEST_F()
810 verifyFormat("var regex = /(?:x)/;"); in TEST_F()
811 verifyFormat("var regex = /x(?=y)/;"); in TEST_F()
812 verifyFormat("var regex = /x(?!y)/;"); in TEST_F()
813 verifyFormat("var regex = /x|y/;"); in TEST_F()
814 verifyFormat("var regex = /a{2}/;"); in TEST_F()
815 verifyFormat("var regex = /a{1,3}/;"); in TEST_F()
817 verifyFormat("var regex = /[abc]/;"); in TEST_F()
818 verifyFormat("var regex = /[^abc]/;"); in TEST_F()
819 verifyFormat("var regex = /[\\b]/;"); in TEST_F()
820 verifyFormat("var regex = /[/]/;"); in TEST_F()
821 verifyFormat("var regex = /[\\/]/;"); in TEST_F()
822 verifyFormat("var regex = /\\[/;"); in TEST_F()
823 verifyFormat("var regex = /\\\\[/]/;"); in TEST_F()
824 verifyFormat("var regex = /}[\"]/;"); in TEST_F()
825 verifyFormat("var regex = /}[/\"]/;"); in TEST_F()
826 verifyFormat("var regex = /}[\"/]/;"); in TEST_F()
828 verifyFormat("var regex = /\\b/;"); in TEST_F()
829 verifyFormat("var regex = /\\B/;"); in TEST_F()
830 verifyFormat("var regex = /\\d/;"); in TEST_F()
831 verifyFormat("var regex = /\\D/;"); in TEST_F()
832 verifyFormat("var regex = /\\f/;"); in TEST_F()
833 verifyFormat("var regex = /\\n/;"); in TEST_F()
834 verifyFormat("var regex = /\\r/;"); in TEST_F()
835 verifyFormat("var regex = /\\s/;"); in TEST_F()
836 verifyFormat("var regex = /\\S/;"); in TEST_F()
837 verifyFormat("var regex = /\\t/;"); in TEST_F()
838 verifyFormat("var regex = /\\v/;"); in TEST_F()
839 verifyFormat("var regex = /\\w/;"); in TEST_F()
840 verifyFormat("var regex = /\\W/;"); in TEST_F()
841 verifyFormat("var regex = /a(a)\\1/;"); in TEST_F()
842 verifyFormat("var regex = /\\0/;"); in TEST_F()
843 verifyFormat("var regex = /\\\\/g;"); in TEST_F()
844 verifyFormat("var regex = /\\a\\\\/g;"); in TEST_F()
845 verifyFormat("var regex = /\a\\//g;"); in TEST_F()
846 verifyFormat("var regex = /a\\//;\n" in TEST_F()
848 verifyFormat("var regex = /'/g;", "var regex = /'/g ;"); in TEST_F()
849 verifyFormat("var regex = /'/g; //'", "var regex = /'/g ; //'"); in TEST_F()
850 verifyFormat("var regex = /\\/*/;\n" in TEST_F()
854 verifyFormat("var x = /a\\//;", "var x = /a\\// \n;"); in TEST_F()
855 verifyFormat("var regex = /\"/;", getGoogleJSStyleWithColumns(16)); in TEST_F()
856 verifyFormat("var regex =\n" in TEST_F()
859 verifyFormat("var regex = //\n" in TEST_F()
861 verifyFormat("var regexs = [\n" in TEST_F()
868 verifyFormat("var regex = /abc/g;"); in TEST_F()
869 verifyFormat("var regex = /abc/i;"); in TEST_F()
870 verifyFormat("var regex = /abc/m;"); in TEST_F()
871 verifyFormat("var regex = /abc/y;"); in TEST_F()
875 verifyFormat("var regex = /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;", in TEST_F()
877 verifyFormat("var regex =\n" in TEST_F()
880 verifyFormat("var regex = /\\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;", in TEST_F()
885 verifyFormat("var regex = search.match(/(?:\?|&)times=([^?&]+)/i);"); in TEST_F()
889 verifyFormat("var x: string;"); in TEST_F()
890 verifyFormat("var x: {a: string; b: number;} = {};"); in TEST_F()
891 verifyFormat("function x(): string {\n return 'x';\n}"); in TEST_F()
892 verifyFormat("function x(): {x: string} {\n return {x: 'x'};\n}"); in TEST_F()
893 verifyFormat("function x(y: string): string {\n return 'x';\n}"); in TEST_F()
894 verifyFormat("for (var y: string in x) {\n x();\n}"); in TEST_F()
895 verifyFormat("for (var y: string of x) {\n x();\n}"); in TEST_F()
896 verifyFormat("function x(y: {a?: number;} = {}): number {\n" in TEST_F()
899 verifyFormat("((a: string, b: number): string => a + b);"); in TEST_F()
900 verifyFormat("var x: (y: number) => string;"); in TEST_F()
901 verifyFormat("var x: P<string, (a: number) => string>;"); in TEST_F()
902 verifyFormat("var x = {y: function(): z { return 1; }};"); in TEST_F()
903 verifyFormat("var x = {y: function(): {a: number} { return 1; }};"); in TEST_F()
904 verifyFormat("function someFunc(args: string[]):\n" in TEST_F()
910 verifyFormat("let x: A|B = A | B;"); in TEST_F()
911 verifyFormat("let x: A&B|C = A & B;"); in TEST_F()
912 verifyFormat("let x: Foo<A|B> = new Foo<A|B>();"); in TEST_F()
913 verifyFormat("function(x: A|B): C&D {}"); in TEST_F()
914 verifyFormat("function(x: A|B = A | B): C&D {}"); in TEST_F()
915 verifyFormat("function x(path: number|string) {}"); in TEST_F()
916 verifyFormat("function x(): string|number {}"); in TEST_F()
917 verifyFormat("type Foo = Bar|Baz;"); in TEST_F()
918 verifyFormat("type Foo = Bar<X>|Baz;"); in TEST_F()
919 verifyFormat("type Foo = (Bar<X>|Baz);"); in TEST_F()
920 verifyFormat("let x: Bar|Baz;"); in TEST_F()
921 verifyFormat("let x: Bar<X>|Baz;"); in TEST_F()
922 verifyFormat("let x: (Foo|Bar)[];"); in TEST_F()
926 verifyFormat("class C {\n x: string = 12;\n}"); in TEST_F()
927 verifyFormat("class C {\n x(): string => 12;\n}"); in TEST_F()
928 verifyFormat("class C {\n ['x' + 2]: string = 12;\n}"); in TEST_F()
929 verifyFormat("class C {\n private x: string = 12;\n}"); in TEST_F()
930 verifyFormat("class C {\n private static x: string = 12;\n}"); in TEST_F()
931 verifyFormat("class C {\n static x(): string { return 'asd'; }\n}"); in TEST_F()
932 verifyFormat("class C extends P implements I {}"); in TEST_F()
933 verifyFormat("class C extends p.P implements i.I {}"); in TEST_F()
934 verifyFormat("class Test {\n" in TEST_F()
938 verifyFormat("foo = class Name {\n" in TEST_F()
941 verifyFormat("foo = class {\n" in TEST_F()
944 verifyFormat("class C {\n" in TEST_F()
950 verifyFormat("class X {\n" in TEST_F()
957 verifyFormat("@Component({\n" in TEST_F()
965 verifyFormat("interface I {\n" in TEST_F()
972 verifyFormat("interface a {}\n" in TEST_F()
977 verifyFormat("interface I {\n" in TEST_F()
983 verifyFormat("enum Foo {\n" in TEST_F()
987 verifyFormat("export /* somecomment*/ enum Foo {\n" in TEST_F()
991 verifyFormat("enum Foo {\n" in TEST_F()
999 verifyFormat("@A\nclass C {\n}"); in TEST_F()
1000 verifyFormat("@A({arg: 'value'})\nclass C {\n}"); in TEST_F()
1001 verifyFormat("@A\n@B\nclass C {\n}"); in TEST_F()
1002 verifyFormat("class C {\n @A x: string;\n}"); in TEST_F()
1003 verifyFormat("class C {\n" in TEST_F()
1009 verifyFormat("class C {\n" in TEST_F()
1012 verifyFormat("class X {}\n" in TEST_F()
1017 verifyFormat("type X = number;\n" in TEST_F()
1019 verifyFormat("type X<Y> = Z<Y>;"); in TEST_F()
1020 verifyFormat("type X = {\n" in TEST_F()
1027 verifyFormat("import SomeThing from 'some/module.js';"); in TEST_F()
1028 verifyFormat("import {X, Y} from 'some/module.js';"); in TEST_F()
1029 verifyFormat("import a, {X, Y} from 'some/module.js';"); in TEST_F()
1030 verifyFormat("import {X, Y,} from 'some/module.js';"); in TEST_F()
1031 verifyFormat("import {X as myLocalX, Y as myLocalY} from 'some/module.js';"); in TEST_F()
1033 verifyFormat("import {X as myX} from 'm';", "import {X as\n" in TEST_F()
1035 verifyFormat("import * as lib from 'some/module.js';"); in TEST_F()
1036 verifyFormat("var x = {import: 1};\nx.import = 2;"); in TEST_F()
1038 verifyFormat("export function fn() {\n" in TEST_F()
1041 verifyFormat("export function A() {}\n" in TEST_F()
1044 verifyFormat("export default () => {\n" in TEST_F()
1048 verifyFormat("export const x = 12;"); in TEST_F()
1049 verifyFormat("export default class X {}"); in TEST_F()
1050 verifyFormat("export {X, Y} from 'some/module.js';"); in TEST_F()
1051 verifyFormat("export {X, Y,} from 'some/module.js';"); in TEST_F()
1052 verifyFormat("export {SomeVeryLongExport as X, " in TEST_F()
1055 verifyFormat("export let someRatherLongVariableName =\n" in TEST_F()
1058 verifyFormat("export {\n" in TEST_F()
1064 verifyFormat("export class C {\n" in TEST_F()
1068 verifyFormat("export class X { y: number; }"); in TEST_F()
1069 verifyFormat("export abstract class X { y: number; }"); in TEST_F()
1070 verifyFormat("export default class X { y: number }"); in TEST_F()
1071 verifyFormat("export default function() {\n return 1;\n}"); in TEST_F()
1072 verifyFormat("export var x = 12;"); in TEST_F()
1073 verifyFormat("class C {}\n" in TEST_F()
1076 verifyFormat("export var x: number = 12;"); in TEST_F()
1077 verifyFormat("export const y = {\n" in TEST_F()
1081 verifyFormat("export enum Foo {\n" in TEST_F()
1086 verifyFormat("export default [\n" in TEST_F()
1090 verifyFormat("export default [];"); in TEST_F()
1091 verifyFormat("export default () => {};"); in TEST_F()
1092 verifyFormat("export interface Foo { foo: number; }\n" in TEST_F()
1099 verifyFormat("import {VeryLongImportsAreAnnoying, VeryLongImportsAreAnnoying," in TEST_F()
1104 verifyFormat("import {\n" in TEST_F()
1110 verifyFormat("import {\n" in TEST_F()
1115 verifyFormat("export {\n" in TEST_F()
1124 verifyFormat("var x = `hello\n" in TEST_F()
1131 verifyFormat("var x =\n" in TEST_F()
1134 verifyFormat("var x = `hello ${world}` >= some();", in TEST_F()
1136 verifyFormat("var x = `hellö ${wörld}` >= söme();", in TEST_F()
1138 verifyFormat("var x = `hello\n" in TEST_F()
1145 verifyFormat("var x = `hello\n" in TEST_F()
1152 verifyFormat("var x =\n" in TEST_F()
1155 verifyFormat("var x =\n `multi\n line`;", "var x = `multi\n line`;", in TEST_F()
1157 verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n" in TEST_F()
1160 verifyFormat( in TEST_F()
1169 verifyFormat( in TEST_F()
1174 verifyFormat("var x = `hello` == `hello`;"); in TEST_F()
1177 verifyFormat("var x = `//a`;\n" in TEST_F()
1181 verifyFormat("var x = `/*a`;\n" in TEST_F()
1186 verifyFormat("var x = `'`; // comment with matching quote '\n" in TEST_F()
1188 verifyFormat("var x = `\"`; // comment with matching quote \"\n" in TEST_F()
1190 verifyFormat("it(`'aaaaaaaaaaaaaaa `, aaaaaaaaa);", in TEST_F()
1194 verifyFormat("var x = 1 // `/*a`;\n" in TEST_F()
1198 verifyFormat("/* ` */ var x = 1; /* ` */", "/* ` */ var x\n= 1; /* ` */"); in TEST_F()
1200 verifyFormat("var x = `/*a`;\n" in TEST_F()
1205 verifyFormat("var x = ` \\` a`;\n" in TEST_F()
1212 verifyFormat("var x = <type>foo;"); in TEST_F()
1213 verifyFormat("var x = foo as type;"); in TEST_F()
1214 verifyFormat("let x = (a + b) as\n" in TEST_F()
1217 verifyFormat("foo = <Bar[]>[\n" in TEST_F()
1224 verifyFormat("class X<Y> {}"); in TEST_F()
1225 verifyFormat("new X<Y>();"); in TEST_F()
1226 verifyFormat("foo<Y>(a);"); in TEST_F()
1227 verifyFormat("var x: X<Y>[];"); in TEST_F()
1228 verifyFormat("class C extends D<E> implements F<G>, H<I> {}"); in TEST_F()
1229 verifyFormat("function f(a: List<any> = null) {}"); in TEST_F()
1230 verifyFormat("function f(): List<any> {}"); in TEST_F()
1231 verifyFormat("function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa():\n" in TEST_F()
1233 verifyFormat("function aaaaaaaaaa(\n" in TEST_F()
1240 verifyFormat( in TEST_F()
1248 verifyFormat("function x(a?: b, c?, d?) {}"); in TEST_F()
1249 verifyFormat("class X {\n" in TEST_F()
1253 verifyFormat("interface X {\n" in TEST_F()
1256 verifyFormat("constructor({aa}: {\n" in TEST_F()
1265 verifyFormat("var x: {[k: string]: v};"); in TEST_F()
1269 verifyFormat("xxxxxxxxxxx(\n" in TEST_F()
1272 verifyFormat("xxxxxxxxxxx(\n" in TEST_F()
1276 verifyFormat("xxxxxxxxxxx(\n" in TEST_F()
1282 verifyFormat("while (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&\n" in TEST_F()
1287 verifyFormat("/**\n" in TEST_F()
1297 verifyFormat("var x = 'foo';", "var x = \"foo\";"); in TEST_F()
1298 verifyFormat("var x = 'fo\\'o\\'';", "var x = \"fo'o'\";"); in TEST_F()
1299 verifyFormat("var x = 'fo\\'o\\'';", "var x = \"fo\\'o'\";"); in TEST_F()
1300 verifyFormat( in TEST_F()
1307 verifyFormat("var x = 'fo\"o';", "var x = \"fo\\\"o\";"); in TEST_F()
1309 verifyFormat("var x = 'fo\"o';", "var x = \"fo\\\"o\";", in TEST_F()
1311 verifyFormat("// clang-format off\n" in TEST_F()
1324 verifyFormat("var x = \"foo\";", DoubleQuotes); in TEST_F()
1325 verifyFormat("var x = \"foo\";", "var x = 'foo';", DoubleQuotes); in TEST_F()
1326 verifyFormat("var x = \"fo'o\";", "var x = 'fo\\'o';", DoubleQuotes); in TEST_F()
1332 verifyFormat("var x = \"foo\";", LeaveQuotes); in TEST_F()
1333 verifyFormat("var x = 'foo';", LeaveQuotes); in TEST_F()
1337 verifyFormat("#!/usr/bin/env node\n" in TEST_F()
1344 verifyFormat("let x = foo!.bar();\n"); in TEST_F()
1345 verifyFormat("let x = foo ? bar! : baz;\n"); in TEST_F()
1346 verifyFormat("let x = !foo;\n"); in TEST_F()
1347 verifyFormat("let x = foo[0]!;\n"); in TEST_F()
1348 verifyFormat("let x = (foo)!;\n"); in TEST_F()
1349 verifyFormat("let x = {foo: 1}!;\n"); in TEST_F()
1353 verifyFormat("y = x ? 1 : 2;"); in TEST_F()
1354 verifyFormat("x ? 1 : 2;"); in TEST_F()
1355 verifyFormat("class Foo {\n" in TEST_F()