Skip to content

Commit d24981a

Browse files
committed
Squiz/InlineComment: Add fixed file for JS test cases.
1 parent 0073743 commit d24981a

File tree

1 file changed

+119
-0
lines changed

1 file changed

+119
-0
lines changed
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
// Some content here.
2+
var code = 'hello';
3+
4+
// This comment contains # multiple
5+
// hash signs (#).
6+
code = 'hello';
7+
8+
/**
9+
* This is the first line of a function comment.
10+
* This is the second line.
11+
*/
12+
function testFunction()
13+
{
14+
// Callback methods which are added by external objects.
15+
this.callbacks = {};
16+
17+
}//end testFunction()
18+
19+
/**
20+
* This is the first line of a class comment.
21+
* This is the second line.
22+
*/
23+
myClass.prototype = {
24+
25+
/**
26+
* This is the first line of a method comment.
27+
* This is the second line.
28+
*/
29+
load: function(url, callback)
30+
{
31+
// Some code here.
32+
}
33+
};
34+
35+
// some code goes here!
36+
/*
37+
A longer comment goes here.
38+
It spans multiple lines!!
39+
Or does it?
40+
*/
41+
42+
// 0This is a simple multi-line
43+
// comment!
44+
code = 'hello';
45+
46+
// This is not valid.
47+
code = 'hello';
48+
49+
// Neither is this!
50+
code = 'hello';
51+
52+
code = 'hello';
53+
54+
/** Neither is this! **/
55+
code = 'hello';
56+
57+
/**
58+
* This is the first line of a function comment.
59+
* This is the second line.
60+
*/
61+
var myFunction = function() {
62+
}
63+
64+
/**
65+
* This is the first line of a function comment.
66+
* This is the second line.
67+
*/
68+
myFunction = function() {
69+
}
70+
71+
/**
72+
* This is the first line of a function comment.
73+
* This is the second line.
74+
*/
75+
myClass.myFunction = function() {
76+
}
77+
78+
dfx.getIframeDocument = function(iframe)
79+
{
80+
return doc;
81+
82+
};//end dfx.getIframeDocument()
83+
84+
mig.Gallery.prototype = {
85+
86+
init: function(cb)
87+
{
88+
89+
},//end init()
90+
91+
imageClicked: function(id)
92+
{
93+
94+
}//end imageClicked()
95+
96+
};
97+
98+
// Here is some inline example code:
99+
// -> One
100+
// -> One.One
101+
// -> Two
102+
/*
103+
Here is some inline example code:
104+
-> One
105+
-> One.One
106+
-> Two
107+
*/
108+
109+
110+
var foo = 'foo'; // Var set to foo.
111+
112+
console.info(foo);
113+
114+
// Comment here.
115+
console.info(foo);
116+
117+
// **
118+
* invalid comment
119+
*/

0 commit comments

Comments
 (0)