-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding tests for indent formatting rules
- Loading branch information
Showing
6 changed files
with
379 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import com.Foo;using com.utils.MathUtil;class Foo{ | ||
// function fBar (x,y); | ||
function fOne(argA:Int, | ||
argB, argC, argD, | ||
argE, argF, argG, argH ){ | ||
var numbers:Array< String> = ['one', | ||
'two', | ||
'three', 'four', 'five', 'six']; | ||
var x = ("" + argA) + argB + | ||
argC + argD + argE + argF + argG + argH; | ||
try { | ||
this.fTwo (argA, argB, argC, | ||
this.fThree( "", argE, argF, argG, argH)); | ||
} catch (ignored:String) { | ||
|
||
} | ||
var z = argA == 'Some string' ? 'yes' : 'no'; | ||
var colors = ['red', 'green', 'blue', 'black', 'white', 'gray']; | ||
for (colorIndex in 0...colors.length) { | ||
var colorString = numbers[colorIndex]; | ||
} | ||
do { | ||
colors.pop (); | ||
} | ||
while (colors. length > 0); | ||
} | ||
|
||
function fTwo(strA, strB, strC, strD) { | ||
if (true) | ||
return strC; | ||
if (strA == 'one' || strB == 'two') { | ||
return strA + strB; | ||
}else | ||
if (true) | ||
return strD; | ||
throw strD; | ||
} | ||
|
||
function fThree ( strA , strB, strC, strD, strE ){ | ||
return strA + strB + strC + strD + strE; | ||
} | ||
public function new ( ) { | ||
switch( v ) { | ||
case 0: | ||
e1(); | ||
case foo(1): | ||
break; | ||
case 65, 90: | ||
e3(); | ||
default: | ||
return; | ||
} | ||
} | ||
|
||
|
||
static public function getBrowser(browserAgent:String):String { | ||
if (browserAgent != null) | ||
{ | ||
if (browserAgent.indexOf("Firefox") | ||
>= 0) { | ||
|
||
_browser = Browser_firefox; | ||
} | ||
|
||
else | ||
if (browserAgent.indexOf("Safari") >= 0) { | ||
_browser = Browser_safari; | ||
} | ||
|
||
else | ||
if (browserAgent.indexOf("MSIE") >= 0) { | ||
_browser = Browser_ie; | ||
} | ||
|
||
else if (browserAgent.indexOf("Opera") >= 0) { | ||
_browser = Browser_opera; | ||
} | ||
|
||
else { | ||
_browser = Browser_unknown; | ||
} | ||
|
||
} | ||
|
||
else { | ||
_browser = Browser_unknown; | ||
} | ||
|
||
return browser; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import com.Foo; | ||
using com.utils.MathUtil; | ||
class Foo { | ||
// function fBar (x,y); | ||
function fOne(argA:Int, | ||
argB, argC, argD, | ||
argE, argF, argG, argH) { | ||
var numbers:Array< String> = ['one', | ||
'two', | ||
'three', 'four', 'five', 'six']; | ||
var x = ("" + argA) + argB + | ||
argC + argD + argE + argF + argG + argH; | ||
try { | ||
this.fTwo(argA, argB, argC, | ||
this.fThree("", argE, argF, argG, argH)); | ||
} catch (ignored:String) { | ||
|
||
} | ||
var z = argA == 'Some string' ? 'yes' : 'no'; | ||
var colors = ['red', 'green', 'blue', 'black', 'white', 'gray']; | ||
for (colorIndex in 0...colors.length) { | ||
var colorString = numbers[colorIndex]; | ||
} | ||
do { | ||
colors.pop(); | ||
} | ||
while (colors. length > 0); | ||
} | ||
|
||
function fTwo(strA, strB, strC, strD) { | ||
if (true) | ||
return strC; | ||
if (strA == 'one' || strB == 'two') { | ||
return strA + strB; | ||
} else if (true) | ||
return strD; | ||
throw strD; | ||
} | ||
|
||
function fThree(strA, strB, strC, strD, strE) { | ||
return strA + strB + strC + strD + strE; | ||
} | ||
|
||
public function new() { | ||
switch( v ) { | ||
case 0: | ||
e1(); | ||
case foo(1): | ||
break; | ||
case 65, 90: | ||
e3(); | ||
default: | ||
return; | ||
} | ||
} | ||
|
||
|
||
static public function getBrowser(browserAgent:String):String { | ||
if (browserAgent != null) { | ||
if (browserAgent.indexOf("Firefox") | ||
>= 0) { | ||
|
||
_browser = Browser_firefox; | ||
} | ||
|
||
else if (browserAgent.indexOf("Safari") >= 0) { | ||
_browser = Browser_safari; | ||
} | ||
|
||
else if (browserAgent.indexOf("MSIE") >= 0) { | ||
_browser = Browser_ie; | ||
} | ||
|
||
else if (browserAgent.indexOf("Opera") >= 0) { | ||
_browser = Browser_opera; | ||
} | ||
|
||
else { | ||
_browser = Browser_unknown; | ||
} | ||
|
||
} | ||
|
||
else { | ||
_browser = Browser_unknown; | ||
} | ||
|
||
return browser; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import com.Foo;using com.utils.MathUtil;class Foo{ | ||
// function fBar (x,y); | ||
function fOne(argA:Int, | ||
argB, argC, argD, | ||
argE, argF, argG, argH ){ | ||
var numbers:Array< String> = ['one', | ||
'two', | ||
'three', 'four', 'five', 'six']; | ||
var x = ("" + argA) + argB + | ||
argC + argD + argE + argF + argG + argH; | ||
try { | ||
this.fTwo (argA, argB, argC, | ||
this.fThree( "", argE, argF, argG, argH)); | ||
} catch (ignored:String) { | ||
|
||
} | ||
var z = argA == 'Some string' ? 'yes' : 'no'; | ||
var colors = ['red', 'green', 'blue', 'black', 'white', 'gray']; | ||
for (colorIndex in 0...colors.length) { | ||
var colorString = numbers[colorIndex]; | ||
} | ||
do { | ||
colors.pop (); | ||
} | ||
while (colors. length > 0); | ||
} | ||
|
||
function fTwo(strA, strB, strC, strD) { | ||
if (true) | ||
return strC; | ||
if (strA == 'one' || strB == 'two') { | ||
return strA + strB; | ||
}else | ||
if (true) | ||
return strD; | ||
throw strD; | ||
} | ||
|
||
function fThree ( strA , strB, strC, strD, strE ){ | ||
return strA + strB + strC + strD + strE; | ||
} | ||
public function new ( ) { | ||
switch( v ) { | ||
case 0: | ||
e1(); | ||
case foo(1): | ||
break; | ||
case 65, 90: | ||
e3(); | ||
default: | ||
return; | ||
} | ||
} | ||
|
||
|
||
static public function getBrowser(browserAgent:String):String { | ||
if (browserAgent != null) | ||
{ | ||
if (browserAgent.indexOf("Firefox") | ||
>= 0) { | ||
|
||
_browser = Browser_firefox; | ||
} | ||
|
||
else | ||
if (browserAgent.indexOf("Safari") >= 0) { | ||
_browser = Browser_safari; | ||
} | ||
|
||
else | ||
if (browserAgent.indexOf("MSIE") >= 0) { | ||
_browser = Browser_ie; | ||
} | ||
|
||
else if (browserAgent.indexOf("Opera") >= 0) { | ||
_browser = Browser_opera; | ||
} | ||
|
||
else { | ||
_browser = Browser_unknown; | ||
} | ||
|
||
} | ||
|
||
else { | ||
_browser = Browser_unknown; | ||
} | ||
|
||
return browser; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import com.Foo; | ||
using com.utils.MathUtil; | ||
class Foo { | ||
// function fBar (x,y); | ||
function fOne(argA:Int, | ||
argB, argC, argD, | ||
argE, argF, argG, argH) { | ||
var numbers:Array< String> = ['one', | ||
'two', | ||
'three', 'four', 'five', 'six']; | ||
var x = ("" + argA) + argB + | ||
argC + argD + argE + argF + argG + argH; | ||
try { | ||
this.fTwo(argA, argB, argC, | ||
this.fThree("", argE, argF, argG, argH)); | ||
} catch (ignored:String) { | ||
|
||
} | ||
var z = argA == 'Some string' ? 'yes' : 'no'; | ||
var colors = ['red', 'green', 'blue', 'black', 'white', 'gray']; | ||
for (colorIndex in 0...colors.length) { | ||
var colorString = numbers[colorIndex]; | ||
} | ||
do { | ||
colors.pop(); | ||
} | ||
while (colors. length > 0); | ||
} | ||
|
||
function fTwo(strA, strB, strC, strD) { | ||
if (true) | ||
return strC; | ||
if (strA == 'one' || strB == 'two') { | ||
return strA + strB; | ||
} else if (true) | ||
return strD; | ||
throw strD; | ||
} | ||
|
||
function fThree(strA, strB, strC, strD, strE) { | ||
return strA + strB + strC + strD + strE; | ||
} | ||
|
||
public function new() { | ||
switch( v ) { | ||
case 0: | ||
e1(); | ||
case foo(1): | ||
break; | ||
case 65, 90: | ||
e3(); | ||
default: | ||
return; | ||
} | ||
} | ||
|
||
|
||
static public function getBrowser(browserAgent:String):String { | ||
if (browserAgent != null) { | ||
if (browserAgent.indexOf("Firefox") | ||
>= 0) { | ||
|
||
_browser = Browser_firefox; | ||
} | ||
|
||
else if (browserAgent.indexOf("Safari") >= 0) { | ||
_browser = Browser_safari; | ||
} | ||
|
||
else if (browserAgent.indexOf("MSIE") >= 0) { | ||
_browser = Browser_ie; | ||
} | ||
|
||
else if (browserAgent.indexOf("Opera") >= 0) { | ||
_browser = Browser_opera; | ||
} | ||
|
||
else { | ||
_browser = Browser_unknown; | ||
} | ||
|
||
} | ||
|
||
else { | ||
_browser = Browser_unknown; | ||
} | ||
|
||
return browser; | ||
} | ||
} |