2017-02-22 00:59:19 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2017-05-24 23:20:05 +03:00
|
|
|
exports[`comments.js 1`] = `
|
|
|
|
switch (true) {
|
|
|
|
case true:
|
|
|
|
// Good luck getting here
|
|
|
|
|
|
|
|
case false:
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (true) {
|
|
|
|
case true:
|
|
|
|
|
|
|
|
// Good luck getting here
|
|
|
|
case false:
|
|
|
|
}
|
|
|
|
|
|
|
|
switch(x) {
|
|
|
|
case x: {
|
|
|
|
}
|
|
|
|
|
|
|
|
// other
|
|
|
|
|
|
|
|
case y: {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
switch (true) {
|
|
|
|
case true:
|
|
|
|
// Good luck getting here
|
|
|
|
|
|
|
|
case false:
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (true) {
|
|
|
|
case true:
|
|
|
|
|
|
|
|
// Good luck getting here
|
|
|
|
case false:
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (x) {
|
|
|
|
case x: {
|
|
|
|
}
|
|
|
|
|
|
|
|
// other
|
|
|
|
|
|
|
|
case y: {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
`;
|
|
|
|
|
2017-04-06 02:27:14 +03:00
|
|
|
exports[`empty_lines.js 1`] = `
|
2017-04-12 23:41:51 +03:00
|
|
|
switch (foo) {
|
|
|
|
case "bar":
|
2017-04-06 02:27:14 +03:00
|
|
|
doSomething();
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "baz":
|
2017-04-06 02:27:14 +03:00
|
|
|
doOtherThing();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (foo) {
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "bar":
|
2017-04-06 02:27:14 +03:00
|
|
|
doSomething();
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "baz":
|
2017-04-06 02:27:14 +03:00
|
|
|
doOtherThing();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (foo) {
|
2017-04-12 23:41:51 +03:00
|
|
|
case "bar":
|
2017-04-06 02:27:14 +03:00
|
|
|
doSomething();
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "baz":
|
2017-04-06 02:27:14 +03:00
|
|
|
doOtherThing();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (foo) {
|
2017-04-12 23:41:51 +03:00
|
|
|
case "bar":
|
2017-04-06 02:27:14 +03:00
|
|
|
doSomething();
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "baz":
|
2017-04-06 02:27:14 +03:00
|
|
|
doOtherThing();
|
|
|
|
}
|
2017-04-10 20:50:02 +03:00
|
|
|
|
|
|
|
switch (x) {
|
|
|
|
case y:
|
|
|
|
call();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case z:
|
|
|
|
call();
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
2017-04-13 03:26:31 +03:00
|
|
|
|
|
|
|
switch (a) {
|
|
|
|
case b:
|
|
|
|
if (1) {};
|
|
|
|
c;
|
|
|
|
}
|
2017-04-15 02:02:19 +03:00
|
|
|
|
|
|
|
switch (a) {
|
|
|
|
case x:
|
|
|
|
case y:
|
|
|
|
call();
|
|
|
|
|
|
|
|
case z:
|
|
|
|
call();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (a) {
|
|
|
|
case x: case y:
|
|
|
|
call();
|
|
|
|
|
|
|
|
case z:
|
|
|
|
call();
|
|
|
|
}
|
2017-04-06 02:27:14 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
switch (foo) {
|
2017-04-12 23:41:51 +03:00
|
|
|
case "bar":
|
2017-04-06 02:27:14 +03:00
|
|
|
doSomething();
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "baz":
|
2017-04-06 02:27:14 +03:00
|
|
|
doOtherThing();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (foo) {
|
2017-04-12 23:41:51 +03:00
|
|
|
case "bar":
|
2017-04-06 02:27:14 +03:00
|
|
|
doSomething();
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "baz":
|
2017-04-06 02:27:14 +03:00
|
|
|
doOtherThing();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (foo) {
|
2017-04-12 23:41:51 +03:00
|
|
|
case "bar":
|
2017-04-06 02:27:14 +03:00
|
|
|
doSomething();
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "baz":
|
2017-04-06 02:27:14 +03:00
|
|
|
doOtherThing();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (foo) {
|
2017-04-12 23:41:51 +03:00
|
|
|
case "bar":
|
2017-04-06 02:27:14 +03:00
|
|
|
doSomething();
|
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
case "baz":
|
2017-04-06 02:27:14 +03:00
|
|
|
doOtherThing();
|
|
|
|
}
|
2017-04-10 20:50:02 +03:00
|
|
|
|
|
|
|
switch (x) {
|
|
|
|
case y:
|
|
|
|
call();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case z:
|
|
|
|
call();
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-04-13 03:26:31 +03:00
|
|
|
switch (a) {
|
|
|
|
case b:
|
|
|
|
if (1) {
|
|
|
|
}
|
|
|
|
c;
|
|
|
|
}
|
|
|
|
|
2017-04-15 02:02:19 +03:00
|
|
|
switch (a) {
|
|
|
|
case x:
|
|
|
|
case y:
|
|
|
|
call();
|
|
|
|
|
|
|
|
case z:
|
|
|
|
call();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (a) {
|
|
|
|
case x:
|
|
|
|
case y:
|
|
|
|
call();
|
|
|
|
|
|
|
|
case z:
|
|
|
|
call();
|
|
|
|
}
|
|
|
|
|
2017-04-06 02:27:14 +03:00
|
|
|
`;
|
|
|
|
|
2017-05-23 23:58:43 +03:00
|
|
|
exports[`empty_statement.js 1`] = `
|
|
|
|
switch (error.code) {
|
|
|
|
case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: {
|
|
|
|
nls.localize('errorInvalidConfiguration', "Unable to write into settings. Correct errors/warnings in the file and try again.");
|
|
|
|
};
|
|
|
|
}
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
switch (error.code) {
|
|
|
|
case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: {
|
|
|
|
nls.localize(
|
|
|
|
"errorInvalidConfiguration",
|
|
|
|
"Unable to write into settings. Correct errors/warnings in the file and try again."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
`;
|
|
|
|
|
2017-03-22 03:38:28 +03:00
|
|
|
exports[`empty_switch.js 1`] = `
|
2017-04-12 23:41:51 +03:00
|
|
|
switch (1) { default:; }
|
2017-01-22 23:40:46 +03:00
|
|
|
switch (1) {}
|
2017-01-22 23:33:21 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
switch (1) {
|
|
|
|
default:
|
|
|
|
}
|
2017-01-22 23:40:46 +03:00
|
|
|
switch (1) {
|
|
|
|
}
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-01-22 23:33:21 +03:00
|
|
|
`;
|